Customisation of registration fields

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
10/17/2008 2:02:34 AM
Gravatar
Total Posts 88

Customisation of registration fields

Hello.. I am struggling at the moment to implement the desired workflow surrounding registration.

My site requires users to apply for registration and to be approved by an administrator before they can access the content. I knpw this isn't possible so what I would like to do instead, is when users apply for registration, a message pops up saying "Thank you for applying for registration. Your request will be approved within 2 days". They would then be added to a simple role that cannot view other pages. The administrator will then (ideally after being notified by e-mail but not essential) add them to the "AuthorisedUsers" role after which they can view other pages.

1. Is there a way of adding this customised message after the user has registered?

2. How do I add customised registration fields with radio button? E.g. :

You are a : [Tenant / Owner / Managing Agent / Other ]

Flat Number : [user enters flat number]

3. Is it possible to add e-mail notification to the administrator when new users have registered?

Any help would be grately appreciated.

Kind Regards,

Leah Taylor

10/17/2008 8:57:31 AM
Gravatar
Total Posts 18439

Re: Customisation of registration fields

Hi Leah,

1. There is not currently anything built in to do that but you could implement a user registered handler and possibly redirect to another page with your message.

2. Currently there is no built in support for Radio Button fields, you could use a dropdown which has similar functionality. This morning I implemented support for using ISettingControl for User Profile fields. ISettingsControl can be just a simple UserControl that implements the simple ISettingControl interface that I have defined in mojoPortal. By making a UserControl that implements this interface you can use radio buttons or anything else inside the user control. This will be in svn trunk within a few days, its only in my sandbox now. I implemented the ISettingControl for ModuleSettings and mentioned it in this blog post, but its useful here too to provide more flexible options for user profile settings. See Web/Controls/GMapTypeSetting.ascx as an example of ISettingControl implemented for selecting google map types using a drop down.

3. Yes there is a Web.config/user.config setting you can use to enable this, look for this setting and set it to true:

<add key="NotifyAdminsOnNewUserRegistration" value="false" />

be aware that this is a global setting so if you have a multi site installation its either on for all of them or off for all of them.

When a user registers they are automatically added to a role named "Authenticated Users", this allows you to have pages configured so that only authenticated users can see it. In your case it sounds like you should create an additional role and limit page view permission on your pages to members of that role. Then when you get the email you can decide whether to add the user to that role.

Hope it helps,

Joe

10/20/2008 8:34:45 AM
Gravatar
Total Posts 88

Re: Customisation of registration fields

Thanks Joe. Unfortunately as I am not a coder :( I am struggling a bit with the implementation...

1. You suggested implementing a user registered handler to redirect to another page with a message stating "Your request will be processed in 2-3 days". I had another thought which might be easier for little 'ol me - could I add text to the registration page (http://localhost/Secure/Register.aspx) that says "Your registration request will take 2-3 days to process", rather than adding a new page to redirect users to? It applies to all new user registrations so I may as well show it on the registration page. If this is possible would you mind giving me step by step instructions as to how to do this?

2. I wasn't sure if you were saying it is already possible to add a dropdown field to the user registration form or if this is currently still in dev. Can you please confirm? Also could you please outline step by step instructions for how to do this using my example of adding a field "Status: Owner  / Tenant / Managing Agent / Other"?

Many thanks as always for your help...

Kind Regards,

Leah

10/20/2008 12:04:39 PM
Gravatar
Total Posts 18439

Re: Customisation of registration fields

Hi Leah,

One possible way to show your message is by creating a user registration agreement with your text.

If you want to put a dropdown in your profile here are the steps you should take.

1. Copy the file mojoProfile.config and rename it to mycustomprofile.config

2. in user.config add this:

<add key="mojoProfileConfigFileName" value="mycustomprofile.config" />

The above is so you don't lose your profile customizations on upgrade.

3. Open your mycustomprofile.config file in a text editor and add this:

<add name="Status"
type="System.String"
allowMarkup="false"
labelResourceKey="Status"
lazyLoad="false"
requiredForRegistration="true"
allowAnonymous="false"
visibleToAnonymous="true"
visibleToAuthenticated="true"
visibleToUser="true"
editableByUser="true"
regexValidationExpression=""
validationErrorResourceKey=""
onlyAvailableForRoles=""
onlyVisibleForRoles=""
defaultValue=""
includeHelpLink="true"
>
<OptionList>
<Option value="Owner" TextResourceKey="Owner"></Option>
<Option value="Tenant" TextResourceKey="Tenant"></Option>
<Option value="Managing Agent" TextResourceKey="Managing Agent"></Option>
<Option value="Other" TextResourceKey="Other"></Option>
</OptionList>
</add>

Next, touch your Web.config file to recycle the app and this dropdown should appear on the registration page and user profile.

For more details about user profile configuration options, see this page: http://www.mojoportal.com/userprofileconfiguration.aspx

Hope it helps,

Joe

 

10/21/2008 11:42:47 AM
Gravatar
Total Posts 88

Re: Customisation of registration fields

Thanks for this Joe... I definitely owe you a beer! :-)

I have managed to get the fields appearing on the user registration. The only (slight) problem is I don't want the user to be able to change these fields after they have registered- only the admin should. I set "editable by user="false" but if I log in as a user I can still edit those fields. Is this a known issue or am I missing something?

 

Many thanks again, enjoy the beer

Best regards

Leah

10/21/2008 1:50:36 PM
Gravatar
Total Posts 18439

Re: Customisation of registration fields

Hi Leah,

Thanks so much for the beer! I shall raise my glass to you this evening!

I just looked into the issue about the editableByUser setting not being applied and I confirm it as a bug.

I just fixed it in my local copy, so it will be fixed in the next release.

Best,

Joe

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