| @@ 449-453 (lines=5) @@ | ||
| 446 | return false; |
|
| 447 | } |
|
| 448 | ||
| 449 | if (! $this->user_model->update($user->id, ['active' => 1, 'activate_hash' => null])) |
|
| 450 | { |
|
| 451 | $this->error = $this->user_model->error(); |
|
| 452 | return false; |
|
| 453 | } |
|
| 454 | ||
| 455 | Events::trigger('didActivate', [(array)$user]); |
|
| 456 | ||
| @@ 470-474 (lines=5) @@ | ||
| 467 | */ |
|
| 468 | public function activateUserById($id) |
|
| 469 | { |
|
| 470 | if (! $this->user_model->update($id, ['active' => 1, 'activate_hash' => null])) |
|
| 471 | { |
|
| 472 | $this->error = $this->user_model->error(); |
|
| 473 | return false; |
|
| 474 | } |
|
| 475 | ||
| 476 | Events::trigger('didActivate', [$this->user_model->as_array()->find($id)]); |
|
| 477 | ||