Original Submission Retrieving a user by its login name ends up with a fatal error when the user we look for is not a LDAP user.
The issue is visible when we try to extract the committer in Subversion post commit hook of the plugin.
Example trace:
Catchable fatal error: Argument 1 passed to Tuleap\User\UserRetrieverByLoginNameEvent::setUser() must be an instance of PFUser, null given, called in /usr/share/tuleap/plugins/ldap/include/ldapPlugin.class.php on line 479 and defined in /usr/share/tuleap/src/common/user/UserRetrieverByLoginNameEvent.php on line 58
Call Stack
# Time Memory Function Location
1 0.0050 243888 {main}( ) ../empty.php:0
2 0.0881 7014080 UserManager->getUserByLoginName( ??? ) ../empty.php:6
3 0.0882 7017776 EventManager->processEvent( ???, ??? ) ../UserManager.class.php:248
4 0.0882 7017824 EventManager->processEventOnListener( ???, ???, ??? ) ../EventManager.class.php:94
5 0.0883 7017824 PluginProxy->processEvent( ???, ??? ) ../EventManager.class.php:106
6 0.0883 7018568 LdapPlugin->getUserByLoginName( ??? ) ../PluginProxy.php:64
7 0.0943 7197456 Tuleap\User\UserRetrieverByLoginNameEvent->setUser( ??? ) ../ldapPlugin.class.php:479