| @@ 430-434 (lines=5) @@ | ||
| 427 | return false; |
|
| 428 | } |
|
| 429 | ||
| 430 | if (! $this->user_model->update($user->id, ['active' => 1, 'activate_hash' => null])) |
|
| 431 | { |
|
| 432 | $this->error = $this->user_model->error(); |
|
| 433 | return false; |
|
| 434 | } |
|
| 435 | ||
| 436 | Events::trigger('didActivate', [(array)$user]); |
|
| 437 | ||
| @@ 451-455 (lines=5) @@ | ||
| 448 | */ |
|
| 449 | public function activateUserById($id) |
|
| 450 | { |
|
| 451 | if (! $this->user_model->update($id, ['active' => 1, 'activate_hash' => null])) |
|
| 452 | { |
|
| 453 | $this->error = $this->user_model->error(); |
|
| 454 | return false; |
|
| 455 | } |
|
| 456 | ||
| 457 | Events::trigger('didActivate', [$this->user_model->as_array()->find($id)]); |
|
| 458 | ||