DataObjects/Core_person.php
authoredward <edward@roojs.com>
Thu, 2 Nov 2017 11:22:51 +0000 (19:22 +0800)
committeredward <edward@roojs.com>
Thu, 2 Nov 2017 11:22:51 +0000 (19:22 +0800)
DataObjects/Core_person.php

index d668f52..7cdaa97 100644 (file)
@@ -1325,8 +1325,13 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
     
     function generateOathKey()
     {
+        require_once 'Text/Password.php';
+        
+//        $key = strtr(ucfirst(Text_Password::create(20)).ucfirst(Text_Password::create(20)), array(
+//        "a"=>"4", "e"=>"3",  "i"=>"1",  "o"=>"0", "s"=>"5",  "t"=>"7"));
+        
         $hex = bin2hex(openssl_random_pseudo_bytes(16));
-        print_R(openssl_random_pseudo_bytes(16));exit;
+        print_R(openssl_random_pseudo_bytes(8));exit;
         $this->oath_key = $hex;
         return $this->oath_key;