Retrieve current logged in users email

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.
3/28/2008 1:03:14 PM
Gravatar
Total Posts 8

Retrieve current logged in users email

is there a way in code to get the currently logged in users email if they are forced to login using their email address?

I have the svn code from 3/24/08.

i have tried to find where it will return that but i am having problems locating this in the source code.

What I want to do is compare the login email address with one stored in another MSSql database that is on another server. I can get that other servers info but I have'nt found the current user's email.

thanks, Bryan

 

 

3/28/2008 1:08:14 PM
Gravatar
Total Posts 18439

Re: Retrieve current logged in users email

In C# code you can do this:

using mojoPortal.Business;
using mojoPortal.Business.WebHelpers;

SiteUser currentUser = SiteUtils.GetCurrentSiteUser();

string email = currentUser.Email;

Hope it helps,

Joe

3/28/2008 2:36:00 PM
Gravatar
Total Posts 8

Re: Retrieve current logged in users email

Works like a charm. Thanks. I was trying something similar but missing the right combination.

Bryan

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