This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Ticket #1486: switch-name.patch

File switch-name.patch, 704 bytes (added by jbenito, 20 months ago)
  • MaKaC/authentication/LDAPAuthentication.py

    diff --git a/MaKaC/authentication/LDAPAuthentication.py b/MaKaC/authentication/LDAPAuthentication.py
    index d060c7f..460eb20 100644
    a b class LDAPUserCreator(object): 
    369369            try: 
    370370                av = user.Avatar() 
    371371                name = data.get('cn') 
    372                 av.setName(name.split()[0]) 
    373                 av.setSurName(name.split()[-1]) 
     372                av.setName(name.split()[-1]) 
     373                av.setSurName(name.split()[0]) 
    374374                av.setOrganisation(data.get('o', "")) 
    375375                av.setEmail(data['mail']) 
    376376                if 'postalAddress' in data: