| @@ 420-424 (lines=5) @@ | ||
| 417 | return false; |
|
| 418 | } |
|
| 419 | ||
| 420 | if (! $this->user_model->update($user->id, ['active' => 1, 'activate_hash' => null])) |
|
| 421 | { |
|
| 422 | $this->error = $this->user_model->error(); |
|
| 423 | return false; |
|
| 424 | } |
|
| 425 | ||
| 426 | Events::trigger('didActivate', [(array)$user]); |
|
| 427 | ||
| @@ 441-445 (lines=5) @@ | ||
| 438 | */ |
|
| 439 | public function activateUserById($id) |
|
| 440 | { |
|
| 441 | if (! $this->user_model->update($id, ['active' => 1, 'activate_hash' => null])) |
|
| 442 | { |
|
| 443 | $this->error = $this->user_model->error(); |
|
| 444 | return false; |
|
| 445 | } |
|
| 446 | ||
| 447 | Events::trigger('didActivate', [$this->user_model->as_array()->find($id)]); |
|
| 448 | ||