Auth::LDAP unusable in combination if UserDB::LDAP isn't called
Concerned version
Version: 2.0.4 Platform: Apache
Summary
[Mon Jun 17 12:06:14.983619 2019] [fcgid:warn] [pid 43] [client 172.18.0.1:49194] mod_fcgid: stderr: Can't locate object method "getUser" via package "Lemonldap::NG::Portal::Auth::LDAP" at /usr/share/perl5/Lemonldap/NG/Portal/Auth/LDAP.pm line 44., referer: http://auth.test.lemon.local:8080/
In the file, there is a strange and unlogical extends functionnality :
# Inheritance: UserDB::LDAP provides all needed ldap functions
extends
qw(Lemonldap::NG::Portal::Auth::_WebForm Lemonldap::NG::Portal::Lib::LDAP);
Why Lemonldap::NG::Portal::Lib::LDAP
instead of Lemonldap::NG::Portal::UserDB::LDAP
?!?!
Logs
[Mon Jun 17 12:06:14.983619 2019] [fcgid:warn] [pid 43] [client 172.18.0.1:49194] mod_fcgid: stderr: Can't locate object method "getUser" via package "Lemonldap::NG::Portal::Auth::LDAP" at /usr/share/perl5/Lemonldap/NG/Portal/Auth/LDAP.pm line 44., referer: http://auth.test.lemon.local:8080/
Possible fixes
I fixed this by changing the 'extends' to
# Inheritance: UserDB::LDAP provides all needed ldap functions
extends
qw(Lemonldap::NG::Portal::Auth::_WebForm Lemonldap::NG::Portal::UserDB::LDAP);
and the return in the init function. Works well !