custom profile fields

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/24/2008 6:14:50 PM
Gravatar
Total Posts 33

custom profile fields

Hi Joe,

I am looking at the user profiles in mojo and try to convert that into our person finder in our corporate...

I have tried adding custom fields, eg, staff numbers, address etc into the profile, it works, however... in order to manipulate the custom fields in code, I used the “profileConfig.PropertyDefinitions”, as you can see the fields are in a collection structure, is it possible to have the custom fields in an associative array, eg Hashtable, so I can get the field value directly by passing the field name, instead of looping thru the collection to find the field?

Cheers

James

8/25/2008 11:40:43 AM
Gravatar
Total Posts 18439

Re: custom profile fields

Hi,

You can set or get any custom profile property using the SiteUser object, you can set or get them by their name as documented at the bottom of this page.

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

When you try the .SetProperty or GetProperty, you will see the different overloads those methos support, you pass in the name of the property as one of the params.

Hope it helps,

Joe

8/25/2008 3:43:00 PM
Gravatar
Total Posts 33

Re: custom profile fields

Thanks Joe, that was very helpful.

Another question, how do I enable the search function to search fields in user profiles??

Cheers

James

8/25/2008 3:59:06 PM
Gravatar
Total Posts 18439

Re: custom profile fields

Hi,

Sorry but that is not implemented. At some point I do plan to implement some kind of advanced user search feature, but right now its very simplistic.

My thinking is that user search should be separate from the main site search as it is now.

If you need something right away I'm afraid you'll have to implement your own feature to do that.

Best,

Joe

8/25/2008 4:04:22 PM
Gravatar
Total Posts 33

Re: custom profile fields

What about the search in member list page?

8/25/2008 4:11:52 PM
Gravatar
Total Posts 18439

Re: custom profile fields

Thats the simple one we have now, it does not search profile fields.

If you want to implement a cusom memberlist with a custom search, build the page in your external project and copy it the root of Web in post build. Name it MemberList.aspx and overwrite the existing one during your post build event.

Hope it helps,

Joe

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