public override bool ValidateUser(string email, string password)
 {
     if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
     {
         return(false);
     }
     using (InterconnectedDb dbContext = new InterconnectedDb())
     {
         var user = dbContext.USERS.Where(c => c.EMAIL == email).Where(c => c.PASSWORD == password).Where(c => c.ACTIVE).FirstOrDefault();
         return((user != null) ? true : false);
     }
 }
        public override MembershipUser GetUser(string email, bool userIsOnline)
        {
            using (InterconnectedDb dbContext = new InterconnectedDb())
            {
                var user = dbContext.USERS.Where(c => c.EMAIL == email).FirstOrDefault();

                if (user == null)
                {
                    return(null);
                }
                var selectedUser = new CustomMemberShipUser(user);

                return(selectedUser);
            }
        }
Exemplo n.º 3
0
 public UserModels()
 {
     db      = new InterconnectedDb();
     ID_ROLE = ConstanAppkey.ID_ROLE_SUPER();
 }
Exemplo n.º 4
0
 public AboutModels()
 {
     db = new InterconnectedDb();
 }
Exemplo n.º 5
0
 public PostsModels()
 {
     db             = new InterconnectedDb();
     commentsModels = new CommentsModels();
 }
Exemplo n.º 6
0
 public VoteModels()
 {
     db = new InterconnectedDb();
 }
Exemplo n.º 7
0
 public CategoriesModels()
 {
     db = new InterconnectedDb();
 }
Exemplo n.º 8
0
 public RoleModels()
 {
     db = new InterconnectedDb();
 }
Exemplo n.º 9
0
 public CommentsModels()
 {
     db = new InterconnectedDb();
 }