示例#1
0
 /**
  * Creates a form model given a token.
  *
  * @param  string                          $token
  * @param  array                           $config name-value pairs that will be used to initialize the object properties
  * @throws \yii\base\InvalidParamException if token is empty or not valid
  */
 public function __construct($token, $config = [])
 {
     if ($token != 'none') {
         if (!empty($token) && is_string($token)) {
             if ($this->_user = User::findByEmailConfirmToken($token)) {
                 $this->userFound = true;
             }
         }
     }
     parent::__construct($config);
 }