Fórumok

Why is Liferay changing the screenname???

thumbnail
lou cat, módosítva 10 év-val korábban

Why is Liferay changing the screenname???

Regular Member Bejegyzések: 196 Csatlakozás dátuma: 2012.01.26. Legújabb bejegyzések
I'm trying to configure ldap with my existing LR 6.0.6 portal, but apart from a long list of problems (which you can find here ), one thing is literally driving me crazy: Liferay is changing the screennames of the users after they are created!!

The behaviour is a a bit random, but it seems it's acting as if it was trying to create another user with the same screen-name, and it appends ".1" and so on in order not to duplicate it.

These are the scenarios when it did it, on and off:

- when I changed the password of the mock user from the Portal Admin control panel
- when I changed the password of the mock user from the mock user account
- when I login as the mock user with the new password
- when I simply change the page from control panel to another one
- when I have auto-generate screen-name on or when it's off
- when ldap is both exported and imported, or also if only exported
- I thought it was linked to ldap only, but it happened also once ldap was disabled! even if less frequently


After a while it even came back to the original screenname value, and most of the time it oscillates between two only.

This is creating a lot of ldap entries for just one user (one for each screen-name created!) and I think it's contributing to some bind authentication issues.

Did anyone experienced anything similar? even if not connected to ldap, could you explain to me why Liferay changes the screen-name?
There shouldn't be any database constraint related... what else could it be?

thanks!
thumbnail
lou cat, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Regular Member Bejegyzések: 196 Csatlakozás dátuma: 2012.01.26. Legújabb bejegyzések
Am I really the only one in the world who had this problem? emoticon
thumbnail
Krzysztof Gołębiowski, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Liferay Master Bejegyzések: 549 Csatlakozás dátuma: 2011.06.25. Legújabb bejegyzések
This seems to be very strange issue, maybe you have some misconfigured properties in portal-ext.properties? Generally I would remote debug two classess - UserLocalServiceImpl method addUserWithWorkflow and DefaultScreenNameGenerator which is responsible for adding .<number> suffix.

You can also play with "Users" section of portal.properties, especially with those ones:
#
# 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

#
# Input a class name that implements
# com.liferay.portal.security.auth.ScreenNameGenerator. This class will be
# called to generate user screen names.
#
users.screen.name.generator=com.liferay.portal.security.auth.DefaultScreenNameGenerator

#
# Input a class name that implements
# com.liferay.portal.security.auth.ScreenNameValidator. This class will be
# called to validate user screen names.
#
users.screen.name.validator=com.liferay.portal.security.auth.DefaultScreenNameValidator
#users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator
thumbnail
Christoph Rabel, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Liferay Legend Bejegyzések: 1555 Csatlakozás dátuma: 2009.09.24. Legújabb bejegyzések
Another wild guess:
Your filter for import is somehow misconfigured and liferay doesn't find the user/can't match it and tries to create a new user? In your case, you need to filter on email address, not username. Please note, that's just a wild guess.

Maybe you could post your ldap configuration here?
Aravinth Raj Raju, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2011.10.03. Legújabb bejegyzések
Hi,

Based on Authentication Search Filter, liferay imports users from LDAP.
Add all mandatory feilds of liferay user in filters.

Thanks,
Aravinth Raj R.
thumbnail
lou cat, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Regular Member Bejegyzések: 196 Csatlakozás dátuma: 2012.01.26. Legújabb bejegyzések
Krzysztof Gołębiowski:
This seems to be very strange issue, maybe you have some misconfigured properties in portal-ext.properties? Generally I would remote debug two classess - UserLocalServiceImpl method addUserWithWorkflow and DefaultScreenNameGenerator which is responsible for adding .<number> suffix.

You can also play with "Users" section of portal.properties, especially with those ones:
[....]


Thank you for the suggestions Krzysztof, at the moment I don't think my portal-ext has misconfigured properties, the only settings for users regards live users (the live monitor is enabled), and public/private layouts (users don't have their own pages).
I have some hooks on login/logout and create-account events, but I undeployed them in my test environment.

I'll try to debug it better following your suggestions!
thumbnail
lou cat, módosítva 10 év-val korábban

RE: Why is Liferay changing the screenname???

Regular Member Bejegyzések: 196 Csatlakozás dátuma: 2012.01.26. Legújabb bejegyzések
Hi Christoph and Aravinth,

Thanks for your insight, I think you're both talking about the liferay-ldap mapping, here is my configuration for users.
In this moment the ldap import is not enalbled though.

---------------------
Authentication Search Filter: (mail=@email_address@)

Import Search Filter : (objectClass=inetOrgPerson)

User Mapping:

Screen Name:cn
Password :userPassword
Email Address :mail
Full Name :
First Name :givenName
Middle Name :
Last Name :sn
Job Title :title
Group :ou
----------------------------------