IsApproved Flag and Logging In

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/12/2009 5:27:43 PM
Gravatar
Total Posts 26

IsApproved Flag and Logging In

Hello Joe and Community,

I've designed a very custom registration page, that sets the MembershipUser.IsApproved Flag to false upon registration.

However, when I login through /Secure/Login.aspx, these unapproved users can still sign in without a problem. This isn't correct behavior for me.

Question 1: Where in the code is the isApproved property checked to prevent login?


NOTE:
The following method is not called by /Secure/Login.aspx
mojoMembershipProvider.ValidateUser()

Question 2: Shouldn't this method be called by <portal:SiteLogin>?

 

thanks,
Michael

8/13/2009 5:49:17 AM
Gravatar
Total Posts 18439

Re: IsApproved Flag and Logging In

Hi,

That field is not currently used. It was originally intended for indicating if a user is approved to post in the forums but it has never been implemented so that field is not surfaced to the UI anywhere.

If you want to block sign in until the email is confirmed we use the RegisterConfirmGuid field. If it has a guid in it other than null or empty guid then the email has not been confirmed. We set the guid and set IsLockedOut to true, send an email that includes the guid and they can click a link to verify and the guid gets set back to null or empty guid and the account is unlocked.

The IsLockedOut field can be set to false to prevent a user from signing in.

SiteLogin inherits from an ASP.NET Login control so some of the magic is hidden in that base class, I'm sure it is calling the membershipprovider.ValidateUser method under the hood somewhere.

Hope it helps,

Joe 

8/13/2009 11:12:34 AM
Gravatar
Total Posts 26

Re: IsApproved Flag and Logging In

Thanks Joe.

You must sign in to post in the forums. This thread is closed to new posts.