| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __construct($token = '', $config = []) |
||
| 28 | { |
||
| 29 | if (empty($token) || !is_string($token)) { |
||
| 30 | throw new InvalidArgumentException(Module::t('module', 'Email confirm token cannot be blank.')); |
||
| 31 | } |
||
| 32 | $this->_user = User::findByEmailConfirmToken($token); |
||
| 33 | if (!$this->_user) { |
||
| 34 | throw new InvalidArgumentException(Module::t('module', 'Wrong Email confirm token.')); |
||
| 35 | } |
||
| 36 | parent::__construct($config); |
||
| 37 | } |
||
| 56 |