Example #1
0
 public boolean register(String[] tabCommands) {
   if (tabCommands.length >= 3) {
     lastResult = null;
     return (user.register(tabCommands[1], tabCommands[2]));
   } else {
     return (false);
   }
 }
Example #2
0
 public boolean login(String[] tabCommands) {
   if (tabCommands.length >= 3) {
     lastResult = user.login(tabCommands[1], tabCommands[2]);
     try {
       if (lastResult.next()) {
         if (userLogin == null) {
           userLogin = lastResult.getString(2);
           userId = lastResult.getString(1);
           return (true);
         } else {
           failLog = "you're already connected";
           return (false);
         }
       }
     } catch (SQLException e) {
       return (false);
     } catch (java.lang.NullPointerException e) {
       return (false);
     }
   }
   failLog = "wrong combination login/password";
   return (false);
 }
Example #3
0
 public boolean getAllUser() {
   lastResult = user.getAllUser();
   return (true);
 }