heiglandreas / authLdap

LDAP-Authentication for WordPress
http://andreas.heigl.org/cat/dev/wp/authldap/
MIT License
69 stars 38 forks source link

Use unfiltered roles-list #222

Closed heiglandreas closed 2 years ago

heiglandreas commented 2 years ago

As the filter is applied to fetch only the roles that the current user can assign to another user - which is not aplicable to what we are doing here - the list can become empty which will result in wrong information being assigned.

Therefore we now simply use the WP_Roles content to define the order of the roles to then use the first role.

This will (hopefully) fix #221