Programmatic access to user data & profile?

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.
10/6/2008 2:42:27 PM
Gravatar
Total Posts 55

Programmatic access to user data & profile?

Hello!

I need to have a mandatory user data: user's company number (string of numericals). In order to leave table mp_User as is, I presume that I must somehow enter those data in mp_UserProfile table. Am I correct? If I am, how to enter those data there from mojoPortal's admin UI?

How to access programmatically user data from currently logged in user, those data kept in both mp_User and mp_UserProfile tables? I've looked into both WebUser and Site User classes, but I couldn't figure it out.

To clarify, I have this usage scenario:

  • User logs in. Some actions became possible for him after that, for example seeing list of his/her company's open accounts.
  • In order not to let him/her view lists of all other companies' open accounts, I must (in my custom module), set appropriate WHERE clause in SQL query - such that contains his/her company number.

So, to that company number attribute I must have programmatic access, and I must somehow enter it in database. How to do that and what's the best way to do it if I don't want to fork from original mojoPortal? Of course, I could rewrite very easily appropriate mp classes and stored procedures, but, as I said, I want to keep in touch with our code repository. 

Thanks in advance.

10/7/2008 5:48:48 AM
Gravatar
Total Posts 55

Re: Programmatic access to user data & profile?

Well, it seems that I've posted help request before browsing all of the relevant forum threads. This thread may describe solution for my problem, so I'll try it and post again if some problem occurs.

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