Developer forum

Forum » Templates » CurrentUser's email empty

CurrentUser's email empty

Nuno Aguiar
Reply

Hi,

 

Using 8.4.1.3 we noticed the Email for the current user is always empty. Can anyone check if this is a bug?

Both in Razor and Dw tags

 

@Dynamicweb.Frontend.PageView.Current().User.Email

<!--@Global:Extranet.Email-->

 

Best Regards,

Nuno


Replies

 
Mikkel Ricky
Reply

I cannot reproduce this behaviour. The data for the current user is stored in session variables:

@foreach (string key in System.Web.HttpContext.Current.Session) {
    if (key.StartsWith("DW_extranet_")) {
        @: @key: @System.Web.HttpContext.Current.Session[key]
    }
}

Are these session variables set?

Best regards,
Mikkel

 
Mario Santos
Reply

Hi Mikkel,

Session variables are set, but the session variable with user's email isn't.

Best Regards,

Mario

 
Mikkel Ricky
Reply

Some follow-up questions: Is the email session variable not set or is it empty? How does the user sign in? Is the email set on the user in User management (just to make sure)?

Best regards,
Mikkel

 
Mario Santos
Reply

Correct, the email is set on the user in User Management.

The email session variable isn't set, doesn't appear on the list.

The sign in form is a simple form because the real one is using ExtranetLogin() in Razor, after custom validations. I've also tried to sign in using Username and Password parameters on URL, but email session variable is also not set.

Best regards,

Mario

 
Mikkel Ricky
Reply

That's weird – and it may be a bug. Do you have a public solution we can take a look at?

Best regards,
Mikkel

 
Mario Santos
Reply

I will talk with my System Administrator because this solution is in an internal server.

 
Mikkel Ricky
Reply
This post has been marked as an answer

This is caused by a very subtle error in the login process. The bug is fixed in Dynamicweb 8.4.1.5 and later. Please try upgrading and let us know if – or if not – this resolves the issue.

Best regards,
Mikkel

Votes for this answer: 1

 

You must be logged in to post in the forum