1 | <?php |
||
19 | class AuthUserBehavior extends Behavior |
||
20 | { |
||
21 | public function init() |
||
48 | |||
49 | /** |
||
50 | * After login action event |
||
51 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
52 | * params -> array('model' => UserModel) |
||
53 | */ |
||
54 | public function afterLogin($event) |
||
61 | |||
62 | /** |
||
63 | * After signup action event |
||
64 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
65 | * params -> array('model' => UserModel) |
||
66 | */ |
||
67 | public function afterSignUp($event) |
||
77 | |||
78 | /** |
||
79 | * After RequestPasswordReset action event |
||
80 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
81 | * params -> array('model' => UserModel) |
||
82 | */ |
||
83 | public function afterRequestPasswordReset($event) |
||
102 | |||
103 | /** |
||
104 | * After ResetPassword action event |
||
105 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
106 | * params -> array('model' => UserModel, 'password' => 'Not encrypt password') |
||
107 | */ |
||
108 | public function afterResetPassword($event) |
||
117 | |||
118 | /** |
||
119 | * Before login action event |
||
120 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
121 | * params -> array('model' => UserModel) |
||
122 | * @return mixed |
||
123 | */ |
||
124 | public function beforeLogin($event) |
||
130 | |||
131 | /** |
||
132 | * Before signup action event |
||
133 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
134 | * params -> array('model' => UserModel) |
||
135 | */ |
||
136 | public function beforeSignup($event) |
||
139 | |||
140 | /** |
||
141 | * Before RequestPasswordReset action event |
||
142 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
143 | * params -> array('model' => UserModel) |
||
144 | */ |
||
145 | public function beforeRequestPasswordReset($event) |
||
148 | |||
149 | /** |
||
150 | * Before ResetPassword action event |
||
151 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
152 | * params -> array('model' => UserModel, 'password' => 'Not encrypt password') |
||
153 | */ |
||
154 | public function beforeResetPassword($event) |
||
157 | |||
158 | /** |
||
159 | * error ResetPassword action event |
||
160 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
161 | * params -> array('model' => UserModel) |
||
162 | * @throws BadRequestHttpException |
||
163 | */ |
||
164 | public function errorResetPassword($event) |
||
168 | |||
169 | /** |
||
170 | * Error RequestPasswordReset action event |
||
171 | * @param ActionEvent $event Object has next params sender -> LoginAction, |
||
172 | * params -> array('model' => UserModel) |
||
173 | */ |
||
174 | public function errorRequestPasswordReset($event) |
||
178 | |||
179 | public function afterLogout($event) |
||
182 | |||
183 | public function beforeLogout($event) |
||
186 | |||
187 | public function errorLogin($event) |
||
190 | |||
191 | public function errorSignup($event) |
||
194 | } |
||
195 |