Exemplo n.º 1
0
        public string Register(Member member)
        {
            var getMember = MemberRepo.GetMemberByAcc(member.m_account);

            if (getMember != null)
            {
                return("帳號已存在");
            }
            member.m_password = HashPassword(member.m_password);
            return(MemberRepo.Register(member));
        }
Exemplo n.º 2
0
        public string Register(Member member)
        {
            var getMember = _memberRepo.GetMemberByAcc(member.m_account);

            if (getMember != null)
            {
                return("帳號已存在");
            }
            var getMemberByEmail = _memberRepo.GetMemberByEmail(member.m_email);

            if (getMemberByEmail != null)
            {
                return("此信箱已註冊過");
            }
            member.m_password   = HashPassword(member.m_password);
            member.validateCode = CreateValidateCode();
            return(_memberRepo.Register(member));
        }