extending mojoPortal

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.
12/8/2011 2:14:23 PM
Gravatar
Total Posts 45
Thanks, cms_developer Contributer:http://codeissue.com/

extending mojoPortal

Hi,

I am in process of writing custom app to enhance mojoPortal functionality for my custom need.

I am able to implement both HelloMojo user and site control app following your docs in site.

My app is associate with user role.I want to be able to do crud operation on user A that are not visible to user B.

What are the classes or modules I need to use or look at to achieve this feature.

Any high level steps or sample code will be appreciated.

12/9/2011 8:58:24 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: extending mojoPortal

If I understand your question correctly, it sounds like you might find use in the mojoPortal.Business.WebHelpers.WebUser class. It contains methods for IsInRole() and IsInRoles().

Hope that helps.

12/9/2011 9:11:18 AM
Gravatar
Total Posts 45
Thanks, cms_developer Contributer:http://codeissue.com/

Re: extending mojoPortal

Yes I just need to able to get user role information from my custom Hellow User Module or site module?

How do I invoke that method from that class?

12/9/2011 9:35:42 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: extending mojoPortal

First add the following using statement to your code behind file if you do not already have it:

using mojoPortal.Business.WebHelpers;

All the methods and properties of the WebUser class are static, so you would just call them in the following fashion:

if(WebUser.IsInRole("Desired Role"))
{
        ...
}

 Where 'WebUser' is getting information about the current user.

For a good example of how it is used, you can view the cs code behind file for MemberList.aspx.cs that resides in the root of the mojoPortal.Web project of the source code. The main use of the WebUser class resides in the LoadSettings() method.

Kerry

12/9/2011 10:00:06 AM
Gravatar
Total Posts 45
Thanks, cms_developer Contributer:http://codeissue.com/

Re: extending mojoPortal

Thanks Kerry for prompt response that is what I need at moment.

Will come with more questions if I get stuck.Have a nice day and happy holiday season to you.

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