Class dektrium\user\models\Account
Inheritance | dektrium\user\models\Account » yii\db\ActiveRecord |
---|
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$finder | dektrium\user\Finder | dektrium\user\models\Account | |
$module | dektrium\user\Module | dektrium\user\models\Account |
Public Methods
Method | Description | Defined By |
---|---|---|
connect() | dektrium\user\models\Account | |
connectWithUser() | Tries to find an account and then connect that account with current user. | dektrium\user\models\Account |
create() | dektrium\user\models\Account | |
find() | dektrium\user\models\Account | |
getConnectUrl() | Returns connect url. | dektrium\user\models\Account |
getDecodedData() | dektrium\user\models\Account | |
getIsConnected() | dektrium\user\models\Account | |
getUser() | dektrium\user\models\Account | |
init() | dektrium\user\models\Account | |
tableName() | dektrium\user\models\Account |
Protected Methods
Method | Description | Defined By |
---|---|---|
fetchAccount() | Tries to find account, otherwise creates new account. | dektrium\user\models\Account |
fetchUser() | Tries to find user or create a new one. | dektrium\user\models\Account |
getFinder() | dektrium\user\models\Account |
Property Details
Method Details
public void connect ( dektrium\user\models\User $user ) | ||
$user |
Tries to find an account and then connect that account with current user.
public static void connectWithUser ( \yii\authclient\ClientInterface $client ) | ||
$client | \yii\authclient\ClientInterface |
public static void create ( \yii\authclient\ClientInterface $client ) | ||
$client |
Tries to find account, otherwise creates new account.
protected static dektrium\user\models\Account fetchAccount ( \yii\authclient\ClientInterface $client ) | ||
$client | \yii\authclient\ClientInterface | |
throws | \yii\base\InvalidConfigException |
---|
Tries to find user or create a new one.
protected static dektrium\user\models\User|bool fetchUser ( dektrium\user\models\Account $account ) | ||
$account | dektrium\user\models\Account | |
return | dektrium\user\models\User|bool | False when can't create user. |
---|
public static dektrium\user\models\query\AccountQuery find ( ) |
Returns connect url.
public string getConnectUrl ( ) |
public mixed getDecodedData ( ) | ||
return | mixed | Json decoded properties. |
---|
protected static dektrium\user\Finder getFinder ( ) |
public bool getIsConnected ( ) | ||
return | bool | Whether this social account is connected to user. |
---|
public dektrium\user\models\User getUser ( ) |
public void init ( ) |
public static void tableName ( ) |