/**
  * Action method that responsible for user sign in
  * @param string $form - Form that user sends by pressing submit button
  */
 public function actionLogin($form = "%form:btnLogin")
 {
     $user = DAL::getUserByAccountData($form->userName, $form->userPass);
     if ($user === false) {
         $_SESSION[self::USER_NOT_FOUND] = true;
         header('Location: /');
     } else {
         $_SESSION[Constants::AUTH_USER_ID] = $user['Id'];
         header("Location: /profile/view/{$user['Id']}");
     }
 }