Skip to content

Commit

Permalink
Fix broken role-assignement
Browse files Browse the repository at this point in the history
Thanks to @Krymonota for this
  • Loading branch information
heiglandreas committed Aug 31, 2023
1 parent f0ff351 commit affd64d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion authLdap.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ function authLdap_login($user, $username, $password, $already_md5 = false)
// we only need this if either LDAP groups are disabled or
// if the WordPress role of the user overrides LDAP groups
if (!$authLDAPGroupEnable || !$authLDAPGroupOverUser) {
$roles[] = authLdap_user_role($uid);
$role = authLdap_user_role($uid);
if ($role !== '') {
$roles[] = $role;
}
// TODO, this needs to be revised, it seems, like authldap is taking only the first role
// even if in WP there are assigned multiple.
}
Expand Down

0 comments on commit affd64d

Please sign in to comment.