PHP 클래스 amnah\yii2\user\controllers\AuthController

상속: extends yii\web\Controller
파일 보기 프로젝트 열기: amnah/yii2-user

공개 프로퍼티들

프로퍼티 타입 설명
$module amnah\yii2\user\Module

공개 메소드들

메소드 설명
actions ( )
connectCallback ( BaseClient $client ) : Response Connect social auth to the logged-in user
loginRegisterCallback ( BaseClient $client ) : Response Login/register via social auth

보호된 메소드들

메소드 설명
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

메소드 상세

actions() 공개 메소드

public actions ( )

attemptLogin() 보호된 메소드

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
리턴 boolean

connectCallback() 공개 메소드

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

doubleCheckUsername() 보호된 메소드

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
리턴 mixed

initUserAuth() 보호된 메소드

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
리턴 amnah\yii2\user\models\UserAuth

loginRegisterCallback() 공개 메소드

Login/register via social auth
public loginRegisterCallback ( BaseClient $client ) : Response
$client yii\authclient\BaseClient
리턴 yii\web\Response

registerAndLoginUser() 보호된 메소드

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() 보호된 메소드

Set info for facebook registration
protected setInfoFacebook ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

setInfoGoogle() 보호된 메소드

Set info for google registration
protected setInfoGoogle ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

setInfoLinkedIn() 보호된 메소드

Set info for LinkedIn registration
protected setInfoLinkedIn ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

setInfoReddit() 보호된 메소드

Set info for reddit registration
protected setInfoReddit ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

setInfoTwitter() 보호된 메소드

Set info for twitter registration
protected setInfoTwitter ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

setInfoVkontakte() 보호된 메소드

Set info for vkontakte registration
저자: Ilya Sheershoff ([email protected])
protected setInfoVkontakte ( array $attributes ) : array
$attributes array
리턴 array [$user, $profile]

프로퍼티 상세

$module 공개적으로 프로퍼티

public Module,amnah\yii2\user $module
리턴 amnah\yii2\user\Module