PHP 클래스 amnah\yii2\user\models\User

상속: extends yii\db\ActiveRecord, implements yii\web\IdentityInterface
파일 보기 프로젝트 열기: amnah/yii2-user 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$currentPassword Current password - for account page updates
$module amnah\yii2\user\Module
$newPassword New password - for registration and changing password
$newPasswordConfirm New password confirmation - for reset

보호된 프로퍼티들

프로퍼티 타입 설명
$permissionCache Permission cache array

공개 메소드들

메소드 설명
attributeLabels ( )
beforeSave ( $insert )
behaviors ( )
can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean Check if user can do specified $permission
checkEmailChange ( ) : string | boolean Check for email change
confirm ( string $newEmail ) : boolean Confirm user email
findIdentity ( $id )
findIdentityByAccessToken ( $token, $type = null )
getAuthKey ( )
getDisplayName ( ) : string | integer Get display name for the user
getId ( )
getProfile ( ) : ActiveQuery
getRole ( ) : ActiveQuery
getUserAuths ( ) : ActiveQuery
getUserTokens ( ) : ActiveQuery
init ( )
rules ( )
sendEmailConfirmation ( amnah\yii2\user\models\UserToken $userToken ) : integer Send email confirmation to user
setRegisterAttributes ( integer $roleId, string $status = null ) : static Set attributes for registration
statusDropdown ( ) : array Get list of statuses for creating dropdowns
updateLoginMeta ( ) : boolean Update login info (ip and time)
validateAuthKey ( $authKey )
validateCurrentPassword ( ) Validate current password (account page)
validatePassword ( string $password ) : boolean Validate password

메소드 상세

attributeLabels() 공개 메소드

public attributeLabels ( )

beforeSave() 공개 메소드

public beforeSave ( $insert )

behaviors() 공개 메소드

public behaviors ( )

can() 공개 메소드

Check if user can do specified $permission
public can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean
$permissionName string
$params array
$allowCaching boolean
리턴 boolean

checkEmailChange() 공개 메소드

Check for email change
public checkEmailChange ( ) : string | boolean
리턴 string | boolean

confirm() 공개 메소드

Confirm user email
public confirm ( string $newEmail ) : boolean
$newEmail string
리턴 boolean

findIdentity() 공개 정적인 메소드

public static findIdentity ( $id )

findIdentityByAccessToken() 공개 정적인 메소드

public static findIdentityByAccessToken ( $token, $type = null )

getAuthKey() 공개 메소드

public getAuthKey ( )

getDisplayName() 공개 메소드

Get display name for the user
public getDisplayName ( ) : string | integer
리턴 string | integer

getId() 공개 메소드

public getId ( )

getProfile() 공개 메소드

public getProfile ( ) : ActiveQuery
리턴 yii\db\ActiveQuery

getRole() 공개 메소드

public getRole ( ) : ActiveQuery
리턴 yii\db\ActiveQuery

getUserAuths() 공개 메소드

public getUserAuths ( ) : ActiveQuery
리턴 yii\db\ActiveQuery

getUserTokens() 공개 메소드

public getUserTokens ( ) : ActiveQuery
리턴 yii\db\ActiveQuery

init() 공개 메소드

public init ( )

rules() 공개 메소드

public rules ( )

sendEmailConfirmation() 공개 메소드

Send email confirmation to user
public sendEmailConfirmation ( amnah\yii2\user\models\UserToken $userToken ) : integer
$userToken amnah\yii2\user\models\UserToken
리턴 integer

setRegisterAttributes() 공개 메소드

Set attributes for registration
public setRegisterAttributes ( integer $roleId, string $status = null ) : static
$roleId integer
$status string
리턴 static

statusDropdown() 공개 정적인 메소드

Get list of statuses for creating dropdowns
public static statusDropdown ( ) : array
리턴 array

updateLoginMeta() 공개 메소드

Update login info (ip and time)
public updateLoginMeta ( ) : boolean
리턴 boolean

validateAuthKey() 공개 메소드

public validateAuthKey ( $authKey )

validateCurrentPassword() 공개 메소드

Validate current password (account page)

validatePassword() 공개 메소드

Validate password
public validatePassword ( string $password ) : boolean
$password string
리턴 boolean

프로퍼티 상세

$currentPassword 공개적으로 프로퍼티

Current password - for account page updates
public $currentPassword

$module 공개적으로 프로퍼티

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

$newPassword 공개적으로 프로퍼티

New password - for registration and changing password
public $newPassword

$newPasswordConfirm 공개적으로 프로퍼티

New password confirmation - for reset
public $newPasswordConfirm

$permissionCache 보호되어 있는 프로퍼티

Permission cache array
protected $permissionCache