Automatically adding New users to custom roles

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.
10/2/2011 9:21:20 PM
Gravatar
Total Posts 2

Automatically adding New users to custom roles

hi joe,

I am working on Real Estate  portal on Mojo. I have custom roles like Individual/Builder/Agents.

I wnt when new user registers i gave him option to select what kind of user he is..I set up Custom roles already in Mojoportal. But when new user registers he automatically added to Authenticated user Role.

Please help me how can i assign new user to Individual/Builder/Agents.

Regards

Malkeet

10/3/2011 12:49:08 PM
Gravatar
Total Posts 18439

Re: Automatically adding New users to custom roles

Hi,

I believe it could be done by

1. Setting up a custom profile property with a dropdown to be shown on the registration page

2. Implement a user registered handler that checks the custom profile property and adds the user to the additional role based on the profile property.

All users should be in the "Authenticated Users" role, that role is used to make it possible to show or hide content based on whether the user is authenticated ie signed in to the site. So this role is not for a choice by the user.

Hope that helps,

Joe

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