static internal bool CheckPasswordMatch(UserDataFetcher UDF, string password) { if (UDF.IsCorrectPassword(password)) { return(true); } return(false); }
static public bool CheckEmailNotTaken(UserDataFetcher UDF, System.Net.Mail.MailAddress mail) { if (UDF.IsEmailTaken(mail)) { return(false); } return(true); }
static public bool CheckUsernameNotTaken(UserDataFetcher UDF, string username) { if (UDF.IsUsernameTaken(username)) { return(false); } return(true); }
static internal void UpdateUserSession(UserDataFetcher UDF, long unix, string hashedUnix) { int userId = UDF.GetId(); if (!InputValidator.ValidateId(userId)) { throw new Exception(); //#change to exception invalid user //default } staticSource.Update(MysqlHandler.tblUsers + $" SET lastActivity = '{unix}', loggedInHash = '{hashedUnix}'" + $" WHERE ID = '{userId}'"); }