Пример #1
0
 public bool CheckAdminPasswordByLogin(string login, string password)
 {
     BL.Modules.Users.UserRoles ubl = new BL.Modules.Users.UserRoles();
     BL.Helpers.MD5CryptoServiceProvider md5 = new Helpers.MD5CryptoServiceProvider();
     BL.User user = db.Users.Where(u => (u.Password == md5.getMd5Hash(password)) && (u.Email == login || u.Login == login) && u.IsActive && u.UserRoleID == ubl.Admin).FirstOrDefault();
     return (user == null);
 }
Пример #2
0
 public bool CheckPasswordByLogin(string login, string password)
 {
     BL.Helpers.MD5CryptoServiceProvider md5 = new Helpers.MD5CryptoServiceProvider();
     BL.User user = db.Users.Where(u => (u.Password == md5.getMd5Hash(password)) && (u.Email.ToUpper() == login.ToUpper() || u.Login.ToUpper() == login.ToUpper()) && u.IsActive).FirstOrDefault();
     return (user == null);
 }