/// <summary> /// Async method that uses the httphandler to see if a user exists. Sets the IsLoggedin property /// </summary> /// <param name="user"></param> internal async void SetUser(User user) { if ((await _httpHandler.DoesUserExist(user.UserName.ToString(), user.UserPassword))) { _currentUser = user; IsLoggedIn = true; } else IsLoggedIn = false; }
/// <summary> /// Initializes the new user and httphandler and sets the _isLoggedIn state as false and /// </summary> public UserModel() { _currentUser = new User(); _isLoggedIn = false; _httpHandler = new UserHttpHandler(5); }