예제 #1
0
 protected override bool CheckContact(string contact, out string errorMessage)
 {
     errorMessage = string.Empty;
     if (!string.IsNullOrWhiteSpace(contact))
     {
         var userMenberInfo = MemberApplication.GetMemberByContactInfo(contact);
         if (userMenberInfo != null)
         {
             errorMessage = "手机或邮箱号码已经存在";
             Cache.Insert(_encryptKey + contact, string.Format("{0}:{1:yyyyMMddHHmmss}", userMenberInfo.Id, userMenberInfo.CreateDate), DateTime.Now.AddHours(1));
             return(false);
         }
         else
         {//不存在,可以绑定
             return(true);
         }
     }
     return(false);
 }