Develop featur integrating with mojoPortal users

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.
3/15/2011 10:18:35 AM
Gravatar
Total Posts 5

Develop feature integrating with mojoPortal users

I'm new, and have just started building a new feature.  Is there a point of reference on how to integrate with the users in the mp_users table?  As I'm building the schema to support my feature, should I just put a UserID and SiteID column on my tables that are specific to users?  And is there an object within the framework that gives me access to user information?  Something like

MojoObject.CurrentLoggedInUser, etc.. ???

Thanks,

Josh

3/15/2011 12:59:07 PM
Gravatar
Total Posts 18439

Re: Develop featur integrating with mojoPortal users

Hi Josh,

The best way to find out how to do such things is to look at the source code for existing features. Almost any common task you will find examples of in the source code.

using mojoPortal.Busines;

SiteUser currentUser = SiteUtils.GetCurrentSiteUser();

Hope it helps,

Joe

3/15/2011 2:13:03 PM
Gravatar
Total Posts 5

Re: Develop featur integrating with mojoPortal users

Great! Thanks!

So, I'll just continue to use this thread to keep notes as I'm thinking to myself, also in the event anybody else searches the thread they might find this useful, or can correct me if I'm doing something stupid.

 

So, it looks like the best approach for my schema is for me to create a UserGuid column on my tables that hold user specific data.

 

[UserGuid] [uniqueidentifier] NOT NULL

 

When working with these tables holding user specific data, I can obtain the UserGuid in code via

SiteUser siteUser = SiteUtils.GetCurrentSiteUser();

String userGuid = siteUser.UserGuid;

 

 

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