예제 #1
0
파일: User.cs 프로젝트: zkenstein/CrowdCMS
        public tbl_Customer SaveCustomer(string email, string firstName, string surname, string telephone, string title, string password, int domainID, int customerID, bool registered, bool detailsFor3rdParties, string adminNote)
        {
            if (registered && customerID == 0 && String.IsNullOrEmpty(password))
            {
                return(null);
            }

            if (String.IsNullOrEmpty(email))
            {
                return(null);
            }

            var customer = CustomerRepository.SaveCustomer(email, firstName, surname, telephone, title, domainID, customerID, registered, detailsFor3rdParties, adminNote);

            if (customer == null)
            {
                return(null);
            }

            if (!String.IsNullOrEmpty(password))
            {
                CustomerRepository.SavePassword(customer.CustomerID, Sha512.GetSHA512Hash(password));
            }

            return(customer);
        }
예제 #2
0
파일: User.cs 프로젝트: zkenstein/CrowdCMS
        public tbl_AdminUsers SaveUser(string email, string userName, string password, int groupID, int userID)
        {
            if (userID == 0 && String.IsNullOrEmpty(password))
            {
                return(null);
            }

            password = String.IsNullOrEmpty(password) ? String.Empty : Sha512.GetSHA512Hash(password);
            return(AdminUserRepository.SaveUser(email, userName, password, groupID, userID));
        }
예제 #3
0
파일: User.cs 프로젝트: zkenstein/CrowdCMS
 public tbl_AdminUsers GetUserByEmailAndPassword(string email, string password)
 {
     return(AdminUserRepository.GetByEmailAndPassword(email, Sha512.GetSHA512Hash(password)));
 }
예제 #4
0
파일: User.cs 프로젝트: zkenstein/CrowdCMS
 public tbl_Customer GetCustomerByEmailAndPassword(string email, string password, int domainID)
 {
     return(CustomerRepository.GetByEmailAndPassword(email, Sha512.GetSHA512Hash(password), domainID));
 }