1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Added realname

This commit is contained in:
Adolfo Gómez García 2018-12-21 10:52:42 +01:00
parent 43398cd125
commit 6a05403464

View File

@ -53,7 +53,7 @@ from uds.models import User
import logging
import six
__updated__ = '2018-08-02'
__updated__ = '2018-12-21'
logger = logging.getLogger(__name__)
authLogger = logging.getLogger('authLog')
@ -165,7 +165,9 @@ def __registerUser(authenticator, authInstance, username):
request = getRequest()
usr = authenticator.getOrCreateUser(username, authInstance.getRealName(username))
usr = authenticator.getOrCreateUser(username)
usr.real_name = authInstance.getRealName(username)
usr.save()
if usr is not None and State.isActive(usr.state):
# Now we update database groups for this user
usr.getManager().recreateGroups(usr)