Session management class
Ejemplo n.º 1
0
 /// <summary>
 /// Method checks if user is registered.
 /// </summary>
 /// <param name="user">user data from POST request</param>
 /// <returns>On success returns session</returns>
 public string logInUser()
 {
     if (checkUser())
     {
        // this.user.userID = 1;
         SessionManager sM = new SessionManager(userID);
         sessionID = sM.getUserSession();
         return sessionID;
     }
     else
         return "";
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Method checks if the session id is valid
 /// </summary>
 /// <returns>True if session is valid</returns>
 public bool chekUserSession()
 {
     // bool result = false;
     var sm = new SessionManager(sessionID);
     return sm.checkSession();
 }