which gets the user profile for the passed owner
if the passed id is null or empty we return Nickname "Anonymous"
if the passed id is correct we retrieve the UserProfile object for this user, and retrieve the Nickname directly from the profile
if the passed id is correct but there is no profile for this user we return Nickname "Missing user"

Thanks for the response Boyan, I'm new to Sitefinity and still trying to figure out how it functions. I'm afraid I'm having difficulty seeing how what you've posted will help me replace the users Nickname with their actualy first and last name. Could you elaborate a little?

I apologize if I have introduced some ambiguity with my previous response. I was trying to elaborate on the mechanism we use for the actual displaying of the value you want to change - by default Sitefinity will always use the UserProfile information, and to be more specific - the Nickname field. You can edit the users' Nicknames and set them to be equal to the FirstName and LastName, so you'll get this value displayed on the forums.

Greetings,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

So our only option is to go into all 1000 user accounts and manually change their nickname to match their real names. And to watch for any new users that sign up and do the same for them? Are you saying that there is no programmatic way for me to pull the users real name rather than their nickname? That makes this CMS seem to be a bit heavy handed.

Please note that as with any other Forums solution, Sitefinity also uses the Nickname field of the user's profile for displaying the forum nickname.

For your conveninece please find below a code sample that will attempt at achieving two tasks:
1. Create a UserProfile for any users that do not have a profile
2. Update the Nickname in the user's profile to match the user's FirstName, or any desired value

Please feel free to modify the solution as per your specific requirements - you can notice the

Copy Code

if (user.FirstName.IsNullOrEmpty())

{

nickname = user.Email;

}

else

{

nickname = user.FirstName;

}

lines which are responsible for passing the NickName value to be set in the profile.

The code has to be executed against the Sitefintiy project (e.g. you can add an ASP.Net WebForm, add it to its code-behind, build the project and then navigate to the WebForm in your browser).

Regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Thank you for your help. As I mentioned in a previous post I'm new to Sitefinity and still trying to figure out how everything works. I appreciate the code sample. My question now is... Where does this code go? Am I to override some existing method? Does this go in a global.asax method? I apologize if this should be obvious but I'm afraid I don't know where to put this code.

Please do not hesitate to share your concerns with us, that's absolutely fine.

In fact Sitefinity derives its roots from a standard .NET WebApplication, so you can apply prior .NET skills for working with ti as well. For example, the current sample that we've provided can be placed in the code-behind of an ASP.NET WebForm, then build the project and navigate to the WebForm in your browser - the code will be executed automatically.

Kind regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Tools

Sitefinity Professional Services

Progress, Telerik, Sitefinity and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.