\SaveUserBehavior

SaveUser Behavior

Summary

Methods
Properties
Constants
beforeValidate()
getEmailFields()
beforeSave()
afterSave()
validateUser()
updateLoginTime()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__setInvalidates()
__setValidates()
__saveDefaultRolesRoomsUser()
No private properties found
N/A

Methods

beforeValidate()

beforeValidate(\Model  $model, array  $options = array()) : mixed

beforeValidate is called before a model is validated, you can use this callback to add behavior validation rules into a models validate array. Returning false will allow you to make the validation fail.

Parameters

\Model $model

Model using this behavior

array $options

Options passed from Model::save().

Returns

mixed —

False or null will abort the operation. Any other result will continue.

getEmailFields()

getEmailFields(\Model  $model) : array

Emailのフィールド取得

Parameters

\Model $model

ビヘイビア呼び出し元モデル

Returns

array

beforeSave()

beforeSave(\Model  $model, array  $options = array()) : mixed

beforeSave is called before a model is saved. Returning false from a beforeSave callback will abort the save operation.

Parameters

\Model $model

Model using this behavior

array $options

Options passed from Model::save().

Returns

mixed —

False if the operation should abort. Any other result will continue.

afterSave()

afterSave(\Model  $model, boolean  $created, array  $options = array()) : boolean

afterSave is called after a model is saved.

Parameters

\Model $model

Model using this behavior

boolean $created

True if this save created a new record

array $options

Options passed from Model::save().

Throws

\InternalErrorException

Returns

boolean

validateUser()

validateUser(\Model  $model, array  $data) : boolean

UserのValidateチェック

Parameters

\Model $model

ビヘイビア呼び出し元モデル

array $data

data

Returns

boolean —

True:正常、False:不正

updateLoginTime()

updateLoginTime(\Model  $model, integer  $userId) : mixed

ユーザの登録処理

Parameters

\Model $model

ビヘイビア呼び出し元モデル

integer $userId

ユーザID

Throws

\InternalErrorException

Returns

mixed —

On success Model::$data, false on failure

__setInvalidates()

__setInvalidates(\Model  $model, array  $userAttribute) : void

invalidatesのセット

Parameters

\Model $model

ビヘイビア呼び出し元モデル

array $userAttribute

UserAttributeデータ

Throws

\BadRequestException

__setValidates()

__setValidates(\Model  $model, array  $userAttribute) : void

validatesのセット

Parameters

\Model $model

ビヘイビア呼び出し元モデル

array $userAttribute

UserAttributeデータ

__saveDefaultRolesRoomsUser()

__saveDefaultRolesRoomsUser(\Model  $model) : boolean

参加ルームの登録

Parameters

\Model $model

Model using this behavior

Throws

\InternalErrorException

Returns

boolean