user = User::findByActivationKey( $token ); if (! $this->user) { throw new InvalidParamException ( 'Wrong activation Key.' ); } parent::__construct ( $config ); } public function rules() { return[ [ 'comment', 'safe' ] ]; } /** * */ }