Integration to Webwizforum

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.
1/7/2009 10:02:48 AM
Gravatar
Total Posts 118

Integration to Webwizforum

I need to integrate webwizforum to the new site I am creating using MojoPortal. Fortunately Webwiz has an API that I can use and all I need to do is set the following session variables:-

Session("USER")=Member_Username

Session("PASSWORD")=Member_Password

Session("Email")=Member_Email

Webwiz will then use these to log the user on.

I have read the sections for the signed in event handler but that appears to require the creation of DLLs that I dont really understand how to do that as i am not a .net developer. Is there any other way to achieve this.

 

Neil

1/7/2009 12:19:59 PM
Gravatar
Total Posts 18439

Re: Integration to Webwizforum

Hi Neil,

The only way I can think of to do it is by implementing a UserSignInHandler and setting the session variables from there and that does require compiling a dll. Since you're a paying customer and since this is very easy, I'm going the extra mile for you and email you a dll that sets the session variables you indicate. The code for it is as follows:

using System.Web;
using log4net;
using mojoPortal.Business.WebHelpers.UserSignInHandlers;

namespace WebWiz.mojoPortal.Helpers
{
public class mojoSignInWebWizHandler : UserSignInHandlerProvider
{
private static readonly ILog log
= LogManager.GetLogger(typeof(mojoSignInWebWizHandler));

public mojoSignInWebWizHandler()
{ }

public override void UserSignInEventHandler(object sender, UserSignInEventArgs e)
{
if (e == null) { return; }
if (e.SiteUser == null) { return; }
if (HttpContext.Current == null) { return; }

// set session vars as indicasted in this forum thread
//http://www.mojoportal.com/Forums/Thread.aspx?thread=2298&forumid=9&ItemID=9&pageid=5&pagenumber=1
HttpContext.Current.Session["USER"] = e.SiteUser.LoginName;
HttpContext.Current.Session["PASSWORD"] = e.SiteUser.Password;
HttpContext.Current.Session["Email"] = e.SiteUser.Email;

log.Debug("mojoSignInWebWizHandler called for user " + e.SiteUser.Email);

}
}
}
 

Best,

Joe

1/7/2009 12:22:40 PM
Gravatar
Total Posts 118

Re: Integration to Webwizforum

Joe

 

You are an absolue star - Many Thanks

 

Neil 

1/7/2009 12:28:55 PM
Gravatar
Total Posts 18439

Re: Integration to Webwizforum

Hope it works for you. Many Thanks for the beer!

Cheers,

Joe

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