hydrian / TTRSS-Auth-LDAP

GitHub repository for Tiny Tiny RSS's auth_ldap plugin
https://github.com/hydrian/TTRSS-Auth-LDAP/wiki
Other
28 stars 21 forks source link

Class Auth_Ldap contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (IAuthModule::hook_auth_user) #42

Closed qqt-lo4 closed 3 years ago

qqt-lo4 commented 3 years ago

Hi

Since a Tiny Tiny RSS upgrade today, I had an issue with this plugin. I had a blank page at start and this php error in error.log : Class Auth_Ldap contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (IAuthModule::hook_auth_user) in /var/www2/TTRSS-Auth-LDAP/plugins/auth_ldap/init.php

I changed the "extends" from plugin to Auth_Base: L46 : class Auth_Ldap extends Auth_Base implements IAuthModule {

I deleted the $base variable: L50 : private $base;

I deleted the variable initialization: L75: $this->base = new Auth_Base($this->link);

And I changed calls to auto_create_user at lines 376 and 379: before: return $this->base->auto_create_user($ttrssUsername); } else { @ldap_close($ldapConn); return $this->base->auto_create_user($login);

after: return $this->auto_create_user($ttrssUsername); } else { @ldap_close($ldapConn); return $this->auto_create_user($login);

Tested successfully with a user that never connected.

Regards, Loïc Ade

qqt-lo4 commented 3 years ago

Duplicate of 39 Sorry, I close this