/** * Validates form and logs the user in. * @return boolean whether the user is logged in successfully */ public function login() { if ($this->validate()) { $this->user->setOffsetFromUTC($this->offsetFromUTC); return \Yii::$app->getUser()->login($this->user, $this->rememberMe ? $this->module->rememberFor : 0); } else { return false; } }