New Extensible Profile System in svn

I just committed the new Extensible Profile System to svn branches/2.x

Anyone who can help test before the release, it would be greatly appreciated. Post in the forums if you have any difficulty or questions.

With this feature, user profile properties are specified in mojoProfile.config file, you can totally customize what properties show up on the user profile page and you can also specify properties that are required for Registration on the site. You can specify any System data type that can be serialized as a string. Boolean properties will be rendered as checkboxes, all other types will be rendered as a textbox. It is also possible to configure dropdown lists, see the Gender property in mojoProfile.config for example syntax:
<add    name="Gender"
                type="System.String"
                allowMarkup="false" 
                labelResourceKey="GenderLabel"
                lazyLoad="false"
                requiredForRegistration="false"
                readOnly="false"
                allowAnonymous="false"
                visibleToAnonymous="false"
                visibleToAuthenticated="true"
                visibleToUser="true"
                editableByUser="true"
                regexValidationExpression=""
                validationErrorResourceKey=""
                onlyAvailableForRoles=""
                defaultValue=""
                includeHelpLink="true"
                >
            <OptionList>
                <Option value="" TextResourceKey="GenderUnselectedLabel"></Option>
                <Option value="M" TextResourceKey="GenderMaleLabel"></Option>
                <Option value="F" TextResourceKey="GenderFemaleLabel"></Option>
                <Option value="T" TextResourceKey="missingkeytest"></Option>
            </OptionList>
        </add>

I'll be working on documentation for this new feature tomorrow, so more to come, but I'm hoping some brave developers will jump right in and try it out.

Update 1/5/2007: I've just completed the documentation for this feature here, let me know if there is anything unclear or any feedback for improving the documentation or the feature itself.

Comments

re: New Extensible Profile System in svn

Tuesday, May 08, 2007 7:28:32 PM

I've just stumbled over the mojo project while looking for php/linux cms's. I am a DNN developer for a day job but this project is one i will be keeping my eye on!!! Mojo seems to be a coders paradise compared to DNN.

Member profiles are always a pain and only Community server has a feature like this that ive used. I see in the documentation you have also made and easy to use class for getting the profile properties. Is it just SetProperty() to set it?

if(Request.IsAuthenticated)
{
SiteUser siteUser = SiteUtils.GetCurrentUser();
siteUser.SetProperty(...)
object someObject = siteUser.GetProperty(...)
}

re: New Extensible Profile System in svn

Wednesday, May 09, 2007 6:54:27 AM

Hi Alex,

Thanks for the interest, its always nice to have DNN folks find out about mojoPortal!

Yes you can set properties with SetProperty, its signature looks like this:

public void SetProperty(
String propertyName,
Object propertyValue,
SettingsSerializeAs serializeAs,
bool lazyLoad)
{
...
}

Currently it only supports properties that can be serialized as string. The lazyLoad param determines whether the property is loaded when an instance of the user is created. If lazyLoad is true the data will be retrieved the first time the property is accessed rater than when the instance of the user is created. There is also an overload of this method without the lazyLoad param which is tha same as calling this one using false for lazyLoad.

Cheers,

Joe

re: New Extensible Profile System in svn

Monday, May 21, 2007 7:24:02 AM

thanks

re: New Extensible Profile System in svn

Thursday, August 02, 2007 5:21:02 PM

great article...

re: New Extensible Profile System in svn

Wednesday, March 12, 2008 2:32:51 AM

thanks you

Comments are closed on this post.