How do I use my module settings in a login event handler?

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.
4/29/2010 10:12:29 AM
Gravatar
Total Posts 20

How do I use my module settings in a login event handler?

Does anyone know how I can access the settings for my module inside a site login event handler?

Hopefully someone can help me figure this out before I have to move this setting outside of the settings for the module. I did already try to add a reference to the mojoPortal.Web namespace but that didn't actually resolve my problem.

4/29/2010 10:28:05 AM
Gravatar
Total Posts 18439

Re: How do I use my module settings in a login event handler?

Hi Desirea,

ModuleSettings are meant for storing feature instance level settings for CMS plugin features. I would not recommend trying to access them from user sign in event handler. There is no context of a cms page or page contained feature instances at the point when a user signs in. I would not recommend doing this.

ModuleSettings can be obtained if you know the moduleid

using mojoPortal.Buxiness;

using System.Collections;

HashTable moduleSettings = ModuleSettings.GetModuleSettings(moduleId);

then you can get individual settings by key from the hashtable but must make sure they exist first.

Hope it helps,

Joe

4/29/2010 10:40:13 AM
Gravatar
Total Posts 20

Re: How do I use my module settings in a login event handler?

Thanks Joe

I think I have a way to get the module ID from one of the other tables. But perhaps a better option is to store this setting into a database table instead.

4/29/2010 11:02:59 AM
Gravatar
Total Posts 20

Re: How do I use my module settings in a login event handler?

And I found a way around having to pull that setting.

 

Thanks again Joe!

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