Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
29 | public function __construct($token = '', $config = []) |
||
30 | { |
||
31 | if (empty($token) || !is_string($token)) { |
||
32 | throw new InvalidArgumentException(Module::t( |
||
33 | 'module', |
||
34 | 'Email confirm token cannot be blank.' |
||
35 | )); |
||
36 | } |
||
37 | $this->user = User::findByEmailConfirmToken($token); |
||
38 | if (!$this->user) { |
||
39 | throw new InvalidArgumentException(Module::t('module', 'Wrong Email confirm token.')); |
||
40 | } |
||
41 | parent::__construct($config); |
||
42 | } |
||
61 |