Code

Fixed create missing trees
[gosa.git] / include / class_password-methods.inc
index 9ed414980e424be0a402f5f8a71a917c21f19858..9696df66d7a2994d09a8379d586fcc76a6904a1e 100644 (file)
@@ -29,6 +29,11 @@ class passwordMethod
   {
   }
 
+
+  function get_hash_name()
+  {
+  }
+
   // Loads Methods in annother way as  get_available_methods do, (For setup ..)
   // and loads them,.
   function get_available_methods_if_not_loaded($path_to_load="../include")
@@ -47,7 +52,6 @@ class passwordMethod
 
 
 
-
   // Crypts a single string, with given Method
   function crypt_single_str($string,$method)
   {
@@ -66,15 +70,15 @@ class passwordMethod
   // this function returns all loaded classes for password encryption
   static function get_available_methods()
   {
-    global $class_mapping;
+    global $class_mapping, $config;
     $ret =false;
     $i =0;
     foreach($class_mapping as $class => $path) {
       if(preg_match('/passwordMethod/i', $class) && !preg_match("/^passwordMethod$/i", $class)){
         $name = preg_replace ("/passwordMethod/i", "", $class);
-        $test = new $class(false);
+        $test = new $class($config);
         if($test->is_available()) {
-          $plugname= strtolower(preg_replace ("/passwordMethod/i","",$class));
+          $plugname= $test->get_hash_name();
           $ret['name'][$i]= $plugname;
           $ret['class'][$i]=$class;
           $ret[$i]['name']= $plugname;
@@ -88,10 +92,34 @@ class passwordMethod
   }
   
 
+  // Method to let password backends remove additional information besides
+  // the userPassword attribute
   function remove_from_parent()
   {
   }
 
+
+  // Method to let passwords backends manage additional information
+  // besides the userAttribute entry
+  function set_password()
+  {
+  }
+
+
+  // Return true if this password method provides a configuration dialog
+  function is_configurable()
+  {
+    return FALSE;
+  }
+
+
+  // Provide a subdialog to configure a password method
+  function configure()
+  {
+    return "";
+  }
+
+
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>