updates user plugin interface and abstract
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Mar 2015 12:33:03 +0000 (13:33 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 Mar 2015 14:04:24 +0000 (15:04 +0100)
* adds missing inspect functions to abstract
* fixes some minor problems

Change-Id: I160228c70c242775fc7b55557137be6b78cf9507
Reviewed-on: http://gerrit.tine20.com/customers/1719
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/EmailUser/Imap/Standard.php
tine20/Tinebase/EmailUser/Smtp/Standard.php
tine20/Tinebase/User/Plugin/Abstract.php
tine20/Tinebase/User/Plugin/SqlInterface.php

index e26503d..1a37894 100644 (file)
 class Tinebase_EmailUser_Imap_Standard extends Tinebase_User_Plugin_Abstract
 {
     /**
-     * email user config
-     * 
-     * @var array 
-     */
-    protected $_config = array();
-    
-    /**
      * config key (Tinebase_Config::IMAP || Tinebase_Config::SMTP)
      * 
      * @var string
index d680041..9bd9b64 100644 (file)
 class Tinebase_EmailUser_Smtp_Standard extends Tinebase_User_Plugin_Abstract
 {
     /**
-     * email user config
-     * 
-     * @var array 
-     */
-    protected $_config = array();
-    
-    /**
      * config key (Tinebase_Config::IMAP || Tinebase_Config::SMTP)
      * 
      * @var string
index f136637..f635112 100644 (file)
@@ -26,7 +26,14 @@ abstract class Tinebase_User_Plugin_Abstract implements Tinebase_User_Plugin_Sql
      * @var Tinebase_Backend_Sql_Command_Interface
      */
     protected $_dbCommand;
-    
+
+    /**
+     * email user config
+     *
+     * @var array
+     */
+    protected $_config = array();
+
     /**
      * inspect data used to create user
      * 
@@ -57,7 +64,39 @@ abstract class Tinebase_User_Plugin_Abstract implements Tinebase_User_Plugin_Sql
             $this->_addUser($_updatedUser, $_newUserProperties);
         }
     }
-    
+
+    /**
+     * inspect get user by property
+     *
+     * @param Tinebase_Model_User  $_user  the user object
+     */
+    public function inspectGetUserByProperty(Tinebase_Model_User $_user)
+    {
+        // do nothing
+    }
+
+    /**
+     * update/set email user password
+     *
+     * @param  string  $_userId
+     * @param  string  $_password
+     * @param  bool    $_encrypt encrypt password
+     */
+    public function inspectSetPassword($_userId, $_password, $_encrypt = TRUE)
+    {
+        // do nothing
+    }
+
+    /**
+     * delete user by id
+     *
+     * @param   Tinebase_Model_FullUser $_user
+     */
+    public function inspectDeleteUser(Tinebase_Model_FullUser $_user)
+    {
+        // do nothing
+    }
+
     /**
      * adds email properties for a new user
      * 
@@ -127,7 +166,8 @@ abstract class Tinebase_User_Plugin_Abstract implements Tinebase_User_Plugin_Sql
         // create a salt that ensures crypt creates an sha2 hash
         $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
             .'abcdefghijklmnopqrstuvwxyz0123456789+/';
-        
+
+        $salt = '';
         for($i=0; $i<16; $i++){
             $salt .= $base64_alphabet[rand(0,63)];
         }
index 73901ea..c49ca3a 100644 (file)
@@ -41,22 +41,6 @@ interface Tinebase_User_Plugin_SqlInterface extends Tinebase_User_Plugin_Interfa
     public function inspectUpdateUser(Tinebase_Model_FullUser $_updatedUser, Tinebase_Model_FullUser $_newUserProperties);
     
     /**
-     * inspect set expiry date
-     * 
-     * @param Tinebase_DateTime  $_expiryDate  the expirydate
-     * @param array      $_ldapData    the data to be written to ldap
-     */
-#    public function inspectExpiryDate($_expiryDate, array &$_ldapData);
-    
-    /**
-     * inspect setStatus
-     * 
-     * @param string  $_status    the status
-     * @param array   $_ldapData  the data to be written to ldap
-     */
-#    public function inspectStatus($_status, array &$_ldapData);
-
-    /**
      * update/set email user password
      * 
      * @param  string  $_userId