PHP 클래스 YumUser

The followings are the available columns in table 'user':
상속: extends YumActiveRecord
파일 보기 프로젝트 열기: thyseus/yii-user-management 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$activationKey
$filter_role
$password
$password_changed
$username

공개 메소드들

메소드 설명
activate ( $email, $key ) Activation of an user account.
afterSave ( )
assignRole ( $role_title )
attributeLabels ( )
beforeValidate ( )
behaviors ( ) flag for password change
can ( $action, $subaction = null ) fulfilled (for example action 'forum', subaction 'read')
delete ( )
generateActivationKey ( $activate = false ) : string
getActivationUrl ( )
getActiveMemberships ( ) Which memberships are bought by the user
getAdmins ( ) : array Return admins.
getAvatar ( $thumb = false )
getFriends ( $everything = false ) set $everything to true to also return pending and rejected friendships
getFriendships ( )
getGravatarHash ( )
getLogins ( )
getPermissions ( $subaction = null ) 3.) All active memberships
getRoles ( )
getUsersByRole ( string $roleTitle ) : array Get all users with a specified role.
hasRole ( $role_title )
isActive ( )
isFriendOf ( $invited_id )
isOnline ( )
isPasswordExpired ( )
itemAlias ( $type, $code = NULL )
logout ( )
model ( $className = __CLASS__ )
register ( $username = null, $password = null, $profile = null ) Registers a user
registerByHybridAuth ( $hybridAuthProfile )
relations ( )
rules ( )
scopes ( )
search ( )
setLastAction ( ) last action when a user does something
setPassword ( $password ) only set the fields. Returns $this so this method can be chained.
syncRoles ( $roles = null )
tableName ( ) : string Returns resolved table name (incl. table prefix when it is set in db configuration) Following algorith of searching valid table name is implemented: - try to find out table name stored in currently used module - if not found try to get table name from UserModule configuration - if not found user default {{users}} table name
withRoles ( $roles )

메소드 상세

activate() 공개 정적인 메소드

If everything is set properly, and the emails exists in the database, and is associated with a correct user, and this user has the status NOTACTIVE and the given activationKey is identical to the one in the database then generate a new Activation key to avoid double activation, set the status to ACTIVATED and save the data Error Codes: -1 : User is not inactive, it can not be activated -2 : Wrong activation key -3 : Profile found, but no user - database inconsistency?
public static activate ( $email, $key )

afterSave() 공개 메소드

public afterSave ( )

assignRole() 공개 메소드

public assignRole ( $role_title )

attributeLabels() 공개 메소드

public attributeLabels ( )

beforeValidate() 공개 메소드

public beforeValidate ( )

behaviors() 공개 메소드

flag for password change
public behaviors ( )

can() 공개 메소드

fulfilled (for example action 'forum', subaction 'read')
public can ( $action, $subaction = null )

delete() 공개 메소드

public delete ( )

generateActivationKey() 공개 메소드

public generateActivationKey ( $activate = false ) : string
리턴 string

getActivationUrl() 공개 메소드

public getActivationUrl ( )

getActiveMemberships() 공개 메소드

Which memberships are bought by the user

getAdmins() 공개 정적인 메소드

Return admins.
public static getAdmins ( ) : array
리턴 array syperusers names

getAvatar() 공개 메소드

public getAvatar ( $thumb = false )

getFriends() 공개 메소드

set $everything to true to also return pending and rejected friendships
public getFriends ( $everything = false )

getFriendships() 공개 메소드

public getFriendships ( )

getGravatarHash() 공개 메소드

public getGravatarHash ( )

getLogins() 공개 메소드

public getLogins ( )

getPermissions() 공개 메소드

3.) All active memberships
public getPermissions ( $subaction = null )

getRoles() 공개 메소드

public getRoles ( )

getUsersByRole() 공개 정적인 메소드

Get all users with a specified role.
public static getUsersByRole ( string $roleTitle ) : array
$roleTitle string title of role to be searched
리턴 array users with specified role. Null if none are found.

hasRole() 공개 메소드

public hasRole ( $role_title )

isActive() 공개 메소드

public isActive ( )

isFriendOf() 공개 메소드

public isFriendOf ( $invited_id )

isOnline() 공개 메소드

public isOnline ( )

isPasswordExpired() 공개 메소드

public isPasswordExpired ( )

itemAlias() 공개 정적인 메소드

public static itemAlias ( $type, $code = NULL )

logout() 공개 메소드

public logout ( )

model() 공개 정적인 메소드

public static model ( $className = __CLASS__ )

register() 공개 메소드

Registers a user
public register ( $username = null, $password = null, $profile = null )

registerByHybridAuth() 공개 메소드

public registerByHybridAuth ( $hybridAuthProfile )

relations() 공개 메소드

public relations ( )

rules() 공개 메소드

public rules ( )

scopes() 공개 메소드

public scopes ( )

setLastAction() 공개 메소드

last action when a user does something
public setLastAction ( )

setPassword() 공개 메소드

only set the fields. Returns $this so this method can be chained.
public setPassword ( $password )

syncRoles() 공개 메소드

public syncRoles ( $roles = null )

tableName() 공개 메소드

Returns resolved table name (incl. table prefix when it is set in db configuration) Following algorith of searching valid table name is implemented: - try to find out table name stored in currently used module - if not found try to get table name from UserModule configuration - if not found user default {{users}} table name
public tableName ( ) : string
리턴 string

withRoles() 공개 메소드

public withRoles ( $roles )

프로퍼티 상세

$activationKey 공개적으로 프로퍼티

public $activationKey

$filter_role 공개적으로 프로퍼티

public $filter_role

$password 공개적으로 프로퍼티

public $password

$password_changed 공개적으로 프로퍼티

public $password_changed

$username 공개적으로 프로퍼티

public $username