1

I have LDAP enabled on my Joomla Server. The thing is when LDAP creates a user in Joomla, it is automatically activated. Where does it set the value of block? I want to pre-configure the code for every user that is created by LDAP to be blocked first and require admin's activation.

  • I've never used LDAP before, but to have an admin activate the account, this is done in the User Manager option in the Joomla backend. Have you tried this yet? – Lodder Mar 26 '15 at 8:08
  • I have no problems with Joomla's registration flow. The only thing is when we use LDAP in registering, the process is this: user logs in credentials that is found in the Active Directory. If it exists in the Directory, it creates the user automatically to joomla's database. However, the user created by LDAP is automatically activated. I can't find the code where we can set the value of activation to false so when a new user is created by LDAP, it would be the same with joomla's flow of registration. – Break the Law Mar 26 '15 at 8:11
  • plugins\authentication\ldap\ldap.php and plugins\authentication\ldap\ldap.php are the only files I can imagine are involved in this process – Lodder Mar 26 '15 at 8:16
  • @Lodder those 2 you mentioned is the same file. – Break the Law Mar 26 '15 at 8:26
  • Oops, the other is libraries\joomla\client\ldap.php – Lodder Mar 26 '15 at 8:27
1

Just to give you an other idea how we build a similar construct for our joomla based installations around the world:

1.) Go to the "Viewing Access Levels", and open the "Registred" users ACL menu entry:

enter image description here

2.) Copy that one and name it "approved-users"

enter image description here

3.) In the global settings change the default access level to "approved-users" enter image description here

3.) Reconfigure your side (modules, pages, menus, ...) so that only the access level "approved-users" can use them. Here is an example for that section for an module entry:

enter image description here

4.) You also could configure a default page only for the user group "registred" which said "Sorry, but an administrator need to approve your account, come back tomorrow".

There is really no "hack" from some Joomla core files needed ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.