mikedopp

Geekswithblogs (edition)

  Home  |   Contact  |   Syndication    |   Login
  74 Posts | 0 Stories | 80 Comments | 0 Trackbacks

News

Twitter












Tag Cloud


Archives

My Blogs

 
I have been looking for a way to do this finally just had to take the time to write it. Enjoy!
 
 
 1: protected void Login1_LoginError(object sender, EventArgs e)
 2:  
 3: {
 4:  String message = login1.FailureText.ToString();
 5:  
 6:  MembershipUser userInfo = Membership.GetUser(login1.UserName);
 7:  if (userInfo == null)
 8:  
 9:  {
 10:  LoginErrorText.Text = String.Empty;
 11:  
 12:  }
 13:  else if (!(userInfo.IsApproved))
 14:  
 15:  LoginErrorText.Text = "Your account has not been approved yet, Please follow instructions in the confirmation email";
 16:  else if (userInfo.IsLockedOut)
 17:  
 18:  LoginErrorText.Text = "Your account has been locked out for security reasons";
 19:  
 20:  else
 21:  LoginErrorText.Text = String.Empty;
 22:  
 23:  
 24:  
 25:  }
posted on Friday, September 21, 2007 3:02 PM