예제 #1
0
        public long RegisterUser(UserTable user, UserLoginTable userLogin)
        {
            if (!UserLoginRepository.CheckEmail(userLogin.email))
            {
                return(-1);
            }
            long ID = UR.Createuser(user);

            userLogin.userID = ID;
            return(UserLoginRepository.AddLoginAccount(userLogin));
        }
예제 #2
0
        public long CheckCredentials(string username, string password)
        {
            if (!UserLoginRepository.CheckEmail(username))
            {
                UserLoginTable userLoginTable = new UserLoginTable
                {
                    email    = username,
                    password = password
                };

                return(UserLoginRepository.CheckPassword(userLoginTable));
            }
            return(-1);
        }