Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function actionActivate($ident) |
||
27 | { |
||
28 | $user = User::findOne(is_numeric($ident) ? $ident : ['email' => $ident]); |
||
29 | if ($user === null) { |
||
30 | $this->stdout("User not found!\n", Console::FG_RED); |
||
31 | |||
32 | return ExitCode::UNSPECIFIED_ERROR; |
||
33 | } |
||
34 | $user->active = 1; |
||
35 | $user->update(false); |
||
36 | $this->stdout("OK!\n"); |
||
37 | |||
38 | return ExitCode::OK; |
||
39 | } |
||
64 | } |