Optionally force site administrators to log in with LDAP
-
I’m in a situation where we want absolutely everyone — including site administrators/super admins — to log in using LDAP, rather than their WordPress password. Version 1.5.4 of Simple LDAP Login is set up so that any site administrator automatically logs in using their WordPress password.
To optionally force site admins to use LDAP, here’s what I did:
I added the following code after line 209 of
Simple-LDAP-Login.php
(where$local_admin
gets set):$local_admin = apply_filters( 'sll_local_admin', $local_admin );
Then, in another (must-use) plugin, I added this code:
add_filter( 'sll_local_admin', '__return_false' );
(This
add_filter()
code could also go in your active theme’sfunctions.php
file.)This works, but I’d like to know — is there a better way to do this? Does a filter already exist within the Simple LDAP Login plugin? Are there plans to make this an optional feature (via an admin screen option, for instance)?
Thanks!
- The topic ‘Optionally force site administrators to log in with LDAP’ is closed to new replies.