Create new SiteUser example?

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.
11/3/2015 9:38:31 AM
Gravatar
Total Posts 2

Create new SiteUser example?

I'm working on a user control that allows an administrator to import users from a CSV and am having a hard time finding examples of using the SiteUser object to create a new user.  Here is what everything I have found looks like...

SiteUser user = new SiteUser(siteSettings);
user.LoginName = "login";
user.Name = "Full Name";
user.Email = "me@test.com";
user.Save();

However, none of the examples say what 'siteSettings' is.  Where does this come from and what should it be?

11/5/2015 8:22:33 AM
Gravatar
Total Posts 18439

Re: Create new SiteUser example?

To get SiteSettings for the current site

SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();

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