0011030: Ldap plugin error: no user object found
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 25 May 2015 19:15:04 +0000 (21:15 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 27 May 2015 15:42:27 +0000 (17:42 +0200)
* fixed by checking user object first

https://forge.tine20.org/view.php?id=11030

Change-Id: I3484a338149d46f6eb4b8a9abc49039a02f83bd9
Reviewed-on: http://gerrit.tine20.com/customers/1947
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/User/Plugin/LdapAbstract.php

index de72ba9..c0b3dee 100644 (file)
@@ -102,7 +102,7 @@ abstract class Tinebase_User_Plugin_LdapAbstract implements Tinebase_User_Plugin
             
             // modify/correct user name
             // set emailUsername to Tine 2.0 account login name and append domain for login purposes if set
-            if (empty($user->emailUsername)) {
+            if (is_object($user) && empty($user->emailUsername)) {
                 $user->emailUsername = $this->_getEmailUserName($_user);
             }