We have this issue since 2012 and we just could solve it hacking the LDAP plugin. Yes, horrible practice and headache when upgrading. I had no success overriding. Not sure if this is a relevant topic since I don't know if other users could have the same situation, but reporting anyways.
We have a type of users that don't have email address registered on LDAP.
When they try to login, we get a 'clear password' error.
However, they have a corporative email, which is 'username@domain.com'.
So we hack ldap.php adding to line 148:
else {
$response->email = $userdetails[0][$ldap_uid][0].'@domain.com.';
}
Login on Joomla by LDAP, when the user has no email address on LDAP server.
Succesfull login
Clear password error - login fails
SLES 12 - Linux/SUSE Enterprise, Apache 2.4.16, PHP 5.5.14, Mysql, Openldap, Joomla! 3.7.5 (since 2.5)
Let me see if I understood your suggestion: I will copy the folder and name it like ldap2. Than I change the code on ldap2. After copying, should I install it from backend extensions > discover ?
And how to avoid conflicts between the 2 ? Sorry, you are talking to a dummy
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | New |
Status | New | ⇒ | Discussion |
And how to avoid conflicts between the 2 ?
What kind of conflicts do you expect? Just disable the core shipped plugin and only enable the ldap2 plugin?
I will copy the folder and name it like ldap2. Than I change the code on ldap2. After copying, should I install it from backend extensions > discover ?
Did you tried it? Maybe on a test site? Please also rename the pligin file from "ldap.php" => "ldap2.php" and the xml file. Please also fix this line in the copied XML file https://github.com/joomla/joomla-cms/blob/staging/plugins/authentication/ldap/ldap.xml#L13
That should do the trick.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-19 08:33:23 |
Closed_By | ⇒ | brianteeman | |
Build | 0 | ⇒ | staging |
hmm did you ever tried to copy the ldap plugin and than implement the changes you need?
As this IMO is not a default case and I'm not sure if the CMS needs to take care of that cases.
The pro in that solution is that there is no problem on updating.