Foros de discusión

e-Mail confirmation after login?

Silvano Fari, modificado hace 13 años.

e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
Hi, I have a LR 6.0.5 CE which authenticates against an active directory. When a configured it to bind to the AD i configured the mapping for e-mail address = userprincipalname.

All the users have been imported as expected and authentication with them worked perfectly.

Then I had to change the mapping to mail e-mail address = mail since the AD admin has configured the correct e-mail address for all users.

I have deleted all the users in order to force a new import. Btw. is there a better way to foce that?

After the reimport all users have their correct address. I can see that in the user management and in the USER_ table.

But when I'm logging in with one of this users it asks me to save a correct email (see attached screnshot) address after successfull authentication. After saving any mail address it lets me in. But it asks again on subsequent logins.

This is weird! Can anybody explain this? I really need to fix this issue very quickly.

Thank you!
Silvano

Archivos adjuntos:

Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
The same doesn't happen for only locally defined user "test". But it happens with every AD user!
thumbnail
Faris Abdulla, modificado hace 13 años.

RE: e-Mail confirmation after login?

Regular Member Mensajes: 183 Fecha de incorporación: 2/09/09 Mensajes recientes
Hi,

How you deleted the user? Directly from User_ table or from the Users Control panel.

The configuration for email address is correct "e-mail address = mail"

In portal-ext.properties
Make sure you have enabled the import:
ldap.import.enabled=true
ldap.import.on.startup=true

Or enable from Control panel settings.
Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
Hi Faris

Thanks for helping me.

I deactivated all users on the console and then deleted them. With the next synchronization from AD they came all back into liferay with the other mapping and the correct mail addresses.

Import is enabled on the gui.

As mentioned before, the problem is not the importing, they are imported.

When does the above shown e-mail saving dialog usually pop up? Is it when the logged in user has an invalid address? What is the purpose of it?

I think the solution would be supress popping it up somehow.

Best Regards
Silvano
thumbnail
Faris Abdulla, modificado hace 13 años.

RE: e-Mail confirmation after login?

Regular Member Mensajes: 183 Fecha de incorporación: 2/09/09 Mensajes recientes
Hi Silvano,

The issue seems that the authentication is not happening in liferay portal. But the authentication is success in your AD.

Are you trying to login with user email address or screenname from AD side?

Can you please try with using screen name for authentication. Please let me know the status.

Are you using any CAS or openSSO for authorization?

Before I had the problem of importing the user from AD to portal due to special characters in screen name. Hope there is no special characters or umlauts used in user data.
Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
Hi Faris

Login by screenname is configured!
We are not using CAS or openSSO yet.
Users are imported well from AD, I can see that when I am login in with the locally defined User test.

Any Idea?

Best Regards
Silvano
Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
The user is properly authenticated. See screenshot below and please note that the dialog (showed by screenshot in older post) does not show a login request it asks for saving an e-mail address!

After the successfull authentication it is popping up this dialog to ask for saving an e-mail address. As mentioned after saving any mail address there it lets me in. But it asks again for the mail address on subsequent logins.

This happens with any user, which has been imported from AD. Even if they have administrator role :-(

Any idea how to solve this!

Archivos adjuntos:

thumbnail
Faris Abdulla, modificado hace 13 años.

RE: e-Mail confirmation after login?

Regular Member Mensajes: 183 Fecha de incorporación: 2/09/09 Mensajes recientes
Hi Silvano,

Can you please make your portal settings to authenticate by Screen name instead of email address.

Control Panel -> Authenticate -> How do users authenticate? Screen Name.

Please try with this else please check LoginUtil.login().
Hope u didnt made any changes in login portlet? Please check whether the user object is available in portal or check the portal is signed in by giving <%= themeDisplay.isSignedIn() %> in ur any jsp.
Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
As mentioned my portal is authenticating by screen name!

It really seams, that the portal is asking for entering an email address after successfull authentication (by screen name) when the email address was generated during import because there was no mail address in the AD available.

The behaviour can even be reproduced with a locally defined user, whose email field is left empty. Logging in with that user behaves the same.

What I find weird is that liferay always generates an email address even if users.email.address.required=false has been set!

To work around this strange behaviour I will just ensure, that every user has a mail address in AD even if it is an invalid one. I think that's the only adequate way to achieve this.

Thanks!
thumbnail
Faris Abdulla, modificado hace 13 años.

RE: e-Mail confirmation after login?

Regular Member Mensajes: 183 Fecha de incorporación: 2/09/09 Mensajes recientes
Hi Silvano,

Sorry for late reply...

Did you fix the problem? If, please let me know how you solved...

Can you check the LDAPAuth.java and LoginAction.java for validating where the exception is thrown.
Silvano Fari, modificado hace 13 años.

RE: e-Mail confirmation after login?

Junior Member Mensajes: 58 Fecha de incorporación: 16/06/10 Mensajes recientes
Hi Faris
As you see in my last post, that we just added a valid mail address to all users in the active directory. Then this behaviour doesn't occur.
thumbnail
Faris Abdulla, modificado hace 13 años.

RE: e-Mail confirmation after login?

Regular Member Mensajes: 183 Fecha de incorporación: 2/09/09 Mensajes recientes
Hi Silvano,

Have you set this behaviour in portal-ext.properties or from Portal ->ControlPanel->Settings

If you setup from control panel. Then the properties will be taken from portal preferences table instead of properties.
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: e-Mail confirmation after login?

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
#
# Set this to true to always autogenerate user screen names even if the user
# gives a specific user screen name. If this is set to true, the LDAP
# importer will fetch users by their email address even if the property
# "company.security.auth.type" is set to screenName.
#
users.screen.name.always.autogenerate=false