Skip to content
  • Inaki's avatar
    auth/ldap MDL-23652 Error in auth_ldap_sync_users.php · 3e5f4b87
    Inaki authored
    We need to specify a valid user id in the call to role_assign(). And we only
    have to make the call if the user has been added successfully, not
    otherwise.
    
    Also make sure we lowercase the memberuser and group distinguished names
    before comparing them. Depending on the LDAP server we can get mixed case
    values for the DNs, and the user may have specified the creators group/ou
    name in a different case.
    
    By the way, this has been broken for ages (since the auth cleanup in 1.8, in
    2007!). It's a bit strange nobody noticed before :-O
    
    Credit goes to Joe Chryst.
    3e5f4b87