Using custom user groups in module 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.

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/9/2011 9:52:27 AM
Gravatar
Total Posts 67

Using custom user groups in module development

Hello, I was wondering if someone could point me in the right direction for utilizing mojo's permission system when developing modules. We're creating custom forms. When the public accesses the form we need to collect certain information, but if a registered (and manually verified) user access the form we need to collect different information. So basically we just need to check if the user is part of a specific user group, and if so hide one panel and show another one. Thanks in advance!

11/9/2011 10:23:21 AM
Gravatar
Total Posts 18439

Re: Using custom user groups in module development

string roleName = "yourrole";

if(WebUser.IsInRole(roleName)
{
...
}

else
{
...
}

Hope that helps,

Joe

11/9/2011 10:28:01 AM
Gravatar
Total Posts 67

Re: Using custom user groups in module development

Thanks Joe, you're the best! That's why I continue to promote mojoPortal!

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