frontend\models\ResetPasswordForm::__construct PHP Method

__construct() public method

Creates a form model given a token.
public __construct ( string $token, array $config = [] )
$token string
$config array name-value pairs that will be used to initialize the object properties
    public function __construct($token, $config = [])
    {
        if (empty($token) || !is_string($token)) {
            throw new InvalidParamException('Password reset token cannot be blank.');
        }
        $this->_user = User::findByPasswordResetToken($token);
        if (!$this->_user) {
            throw new InvalidParamException('Wrong password reset token.');
        }
        parent::__construct($config);
    }