Code

Added function to passwordMethod, create_template_hash()
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 08:47:04 +0000 (08:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 08:47:04 +0000 (08:47 +0000)
-Allows to set password methods in templates too.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12862 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/password-methods/class_password-methods.inc

index 86441b533849d4bc9337791b0fd6a2b9537ef1aa..13bf07ec29f4478240be648e00ca43455eeb42fc 100644 (file)
@@ -32,6 +32,14 @@ class passwordMethod
   {
   }
 
+  function create_template_hash($attrs)
+  {
+    if($this->get_hash_name() == ""){
+      return("{crypt}N0T$3T4N0W");
+    }else{
+      return('{'.$this->get_hash_name().'}').'N0T$3T4N0W';
+    }
+  }
 
   function get_hash_name()
   {