PHP Class amnah\yii2\user\controllers\AuthController

Inheritance: extends yii\web\Controller
Afficher le fichier Open project: amnah/yii2-user

Méthodes publiques

Свойство Type Description
$module amnah\yii2\user\Module

Méthodes publiques

Méthode Description
actions ( )
connectCallback ( BaseClient $client ) : Response Connect social auth to the logged-in user
loginRegisterCallback ( BaseClient $client ) : Response Login/register via social auth

Méthodes protégées

Méthode Description
attemptLogin ( BaseClient $client ) : boolean Attempt to log user in by checking if $userAuth already exists in the db, or if a user already has the email address
doubleCheckUsername ( User $user, string $fallbackUsername ) : mixed Double checks username to ensure that it isn't already taken. If so, revert to fallback
initUserAuth ( BaseClient $client ) : amnah\yii2\user\models\UserAuth Initialize a userAuth model based on $client data. Note that we don't set user_id yet because that can either be the currently logged in user OR a user matched by email address
registerAndLoginUser ( BaseClient $client, amnah\yii2\user\models\UserAuth $userAuth ) Register a new user using client attributes and then associate userAuth
setInfoFacebook ( array $attributes ) : array Set info for facebook registration
setInfoGoogle ( array $attributes ) : array Set info for google registration
setInfoLinkedIn ( array $attributes ) : array Set info for LinkedIn registration
setInfoReddit ( array $attributes ) : array Set info for reddit registration
setInfoTwitter ( array $attributes ) : array Set info for twitter registration
setInfoVkontakte ( array $attributes ) : array Set info for vkontakte registration

Method Details

actions() public méthode

public actions ( )

attemptLogin() protected méthode

Attempt to log user in by checking if $userAuth already exists in the db, or if a user already has the email address
protected attemptLogin ( BaseClient $client ) : boolean
$client yii\authclient\BaseClient
Résultat boolean

connectCallback() public méthode

Connect social auth to the logged-in user
public connectCallback ( BaseClient $client ) : Response
$client yii\authclient\BaseClient
Résultat yii\web\Response

doubleCheckUsername() protected méthode

Double checks username to ensure that it isn't already taken. If so, revert to fallback
protected doubleCheckUsername ( User $user, string $fallbackUsername ) : mixed
$user amnah\yii2\user\models\User
$fallbackUsername string
Résultat mixed

initUserAuth() protected méthode

Initialize a userAuth model based on $client data. Note that we don't set user_id yet because that can either be the currently logged in user OR a user matched by email address
protected initUserAuth ( BaseClient $client ) : amnah\yii2\user\models\UserAuth
$client yii\authclient\BaseClient
Résultat amnah\yii2\user\models\UserAuth

loginRegisterCallback() public méthode

Login/register via social auth
public loginRegisterCallback ( BaseClient $client ) : Response
$client yii\authclient\BaseClient
Résultat yii\web\Response

registerAndLoginUser() protected méthode

Register a new user using client attributes and then associate userAuth
protected registerAndLoginUser ( BaseClient $client, amnah\yii2\user\models\UserAuth $userAuth )
$client yii\authclient\BaseClient
$userAuth amnah\yii2\user\models\UserAuth

setInfoFacebook() protected méthode

Set info for facebook registration
protected setInfoFacebook ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

setInfoGoogle() protected méthode

Set info for google registration
protected setInfoGoogle ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

setInfoLinkedIn() protected méthode

Set info for LinkedIn registration
protected setInfoLinkedIn ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

setInfoReddit() protected méthode

Set info for reddit registration
protected setInfoReddit ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

setInfoTwitter() protected méthode

Set info for twitter registration
protected setInfoTwitter ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

setInfoVkontakte() protected méthode

Set info for vkontakte registration
Author: Ilya Sheershoff ([email protected])
protected setInfoVkontakte ( array $attributes ) : array
$attributes array
Résultat array [$user, $profile]

Property Details

$module public_oe property

public Module,amnah\yii2\user $module
Résultat amnah\yii2\user\Module