Example #1
0
 public function updateUserStatus(User $user)
 {
     if (!($user->getStatus() == 'N' || $user->getStatus() == 'I')) {
         throw new SSSException(ErrorFactory::ERR_WRONG_USER_STATUS);
     }
     $userMod = new UserModel();
     try {
         $userFound = $userMod->updateStatus($user);
         if ($userFound === FALSE) {
             throw new SSSException(ErrorFactory::ERR_DB_INVALID_RESULT);
         }
         $ret['result'] = "success";
         return $ret;
     } catch (SSSException $e) {
         return $e->getError();
     }
 }