forked from shaba/openuds
Fixed groups on internal auth
This commit is contained in:
parent
1c31e01199
commit
6270119d2b
@ -82,10 +82,12 @@ class InternalDBAuth(Authenticator):
|
||||
# and access will be denied
|
||||
try:
|
||||
usr = auth.users.get(name=username, state=State.ACTIVE)
|
||||
groups = usr.groups.all()
|
||||
usr.id = None
|
||||
if usr.real_name.strip() == '':
|
||||
usr.real_name = usr.name
|
||||
usr.name = newUsername
|
||||
usr.groups = groups
|
||||
usr.save()
|
||||
except:
|
||||
logger.exception('Exception')
|
||||
|
Loading…
Reference in New Issue
Block a user