PHP 클래스 RainLab\User\Models\User

상속: extends October\Rain\Auth\Models\User, use trait October\Rain\Database\Traits\SoftDeleting
파일 보기 프로젝트 열기: rainlab/user-plugin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$attachOne
$belongsToMany Relations
$loginAttribute
$rules Validation rules

보호된 프로퍼티들

프로퍼티 타입 설명
$dates
$fillable The attributes that are mass assignable.
$purgeable Purge attributes from data set.
$table The database table used by the model.

공개 메소드들

메소드 설명
afterCreate ( ) : void After create event
afterDelete ( ) : void After delete event
afterLogin ( ) : void After login event
attemptActivation ( string $code ) : void Sends the confirmation email to a user, after activating.
ban ( ) : void Ban this user, preventing them from signing in.
beforeValidate ( ) : void Before validation event
convertToRegistered ( $sendNotification = true ) : void Converts a guest user to a registered one and sends an invitation notification.
findByEmail ( $email ) : self Looks up a user by their email address.
getAvatarThumb ( $size = 25, $options = null ) Returns the public image file path to this user's avatar.
getLastSeen ( ) : Carbon\Carbon Returns the date this user was last seen.
getLoginName ( ) : string Returns the name for the user's login.
getPersistCode ( ) : string Gets a code for when the user is persisted to a cookie or session which identifies the user.
isBanned ( ) : boolean Check if the user is banned.
isOnline ( ) : boolean Returns true if the user has been active within the last 5 minutes.
scopeFilterByGroup ( $query, $filter )
scopeIsActivated ( $query )
touchLastSeen ( ) : void Checks if the user has been seen in the last 5 minutes, and if not, updates the last_seen timestamp to reflect their online status.
unban ( ) : void Remove the ban on this user.

보호된 메소드들

메소드 설명
generatePassword ( ) : void Assigns this user with a random password.
getNotificationVars ( ) : array Returns the variables available when sending a user notification.
sendInvitation ( ) : void Sends an invitation to the user using template "rainlab.user::mail.invite".

메소드 상세

afterCreate() 공개 메소드

After create event
public afterCreate ( ) : void
리턴 void

afterDelete() 공개 메소드

After delete event
public afterDelete ( ) : void
리턴 void

afterLogin() 공개 메소드

After login event
public afterLogin ( ) : void
리턴 void

attemptActivation() 공개 메소드

Sends the confirmation email to a user, after activating.
public attemptActivation ( string $code ) : void
$code string
리턴 void

ban() 공개 메소드

Ban this user, preventing them from signing in.
public ban ( ) : void
리턴 void

beforeValidate() 공개 메소드

Before validation event
public beforeValidate ( ) : void
리턴 void

convertToRegistered() 공개 메소드

Converts a guest user to a registered one and sends an invitation notification.
public convertToRegistered ( $sendNotification = true ) : void
리턴 void

findByEmail() 공개 정적인 메소드

Looks up a user by their email address.
public static findByEmail ( $email ) : self
리턴 self

generatePassword() 보호된 메소드

Assigns this user with a random password.
protected generatePassword ( ) : void
리턴 void

getAvatarThumb() 공개 메소드

Returns the public image file path to this user's avatar.
public getAvatarThumb ( $size = 25, $options = null )

getLastSeen() 공개 메소드

Returns the date this user was last seen.
public getLastSeen ( ) : Carbon\Carbon
리턴 Carbon\Carbon

getLoginName() 공개 메소드

Returns the name for the user's login.
public getLoginName ( ) : string
리턴 string

getNotificationVars() 보호된 메소드

Returns the variables available when sending a user notification.
protected getNotificationVars ( ) : array
리턴 array

getPersistCode() 공개 메소드

Gets a code for when the user is persisted to a cookie or session which identifies the user.
public getPersistCode ( ) : string
리턴 string

isBanned() 공개 메소드

Check if the user is banned.
public isBanned ( ) : boolean
리턴 boolean

isOnline() 공개 메소드

Returns true if the user has been active within the last 5 minutes.
public isOnline ( ) : boolean
리턴 boolean

scopeFilterByGroup() 공개 메소드

public scopeFilterByGroup ( $query, $filter )

scopeIsActivated() 공개 메소드

public scopeIsActivated ( $query )

sendInvitation() 보호된 메소드

Sends an invitation to the user using template "rainlab.user::mail.invite".
protected sendInvitation ( ) : void
리턴 void

touchLastSeen() 공개 메소드

Checks if the user has been seen in the last 5 minutes, and if not, updates the last_seen timestamp to reflect their online status.
public touchLastSeen ( ) : void
리턴 void

unban() 공개 메소드

Remove the ban on this user.
public unban ( ) : void
리턴 void

프로퍼티 상세

$attachOne 공개적으로 프로퍼티

public $attachOne

$belongsToMany 공개적으로 프로퍼티

Relations
public $belongsToMany

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

protected $dates

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

The attributes that are mass assignable.
protected $fillable

$loginAttribute 공개적으로 정적으로 프로퍼티

public static $loginAttribute

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

Purge attributes from data set.
protected $purgeable

$rules 공개적으로 프로퍼티

Validation rules
public $rules

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

The database table used by the model.
protected $table