0011994: password expired message should not show with imap auth backend
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 4 Jul 2016 10:15:57 +0000 (12:15 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 8 Jul 2016 09:52:35 +0000 (11:52 +0200)
https://forge.tine20.org/view.php?id=11994

Change-Id: I31898f3ac08baf169e94f7bb765cc030ebab75d1
Reviewed-on: http://gerrit.tine20.com/customers/3299
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Model/FullUser.php

index 38b54fc..cd05a67 100644 (file)
@@ -318,7 +318,9 @@ class Tinebase_Model_FullUser extends Tinebase_Model_User
     
     /**
      * returns TRUE if user has to change his/her password (compare sambaSAM->pwdMustChange with Tinebase_DateTime::now())
-     * 
+     *
+     * TODO switch check AUTH backend?
+     *
      * @return boolean
      */
     public function mustChangePassword()
@@ -326,17 +328,19 @@ class Tinebase_Model_FullUser extends Tinebase_Model_User
         switch (Tinebase_User::getConfiguredBackend()) {
             case Tinebase_User::ACTIVEDIRECTORY:
                 return $this->_sambaSamPasswordChangeNeeded();
-                
                 break;
                 
             case Tinebase_User::LDAP:
                 return $this->_sambaSamPasswordChangeNeeded();
-                
                 break;
                 
             default:
-                return $this->_sqlPasswordChangeNeeded();
-                
+                if (Tinebase_Auth::getConfiguredBackend() === Tinebase_Auth::SQL) {
+                    return $this->_sqlPasswordChangeNeeded();
+                } else {
+                    // no pw change needed for non-sql auth backends
+                    return false;
+                }
                 break;
         }
     }