DataObjects/Core_person.php
authorEdward <edward@roojs.com>
Wed, 19 Dec 2018 07:25:07 +0000 (15:25 +0800)
committerEdward <edward@roojs.com>
Wed, 19 Dec 2018 07:25:07 +0000 (15:25 +0800)
DataObjects/Core_person.php

index db69842..ea39252 100644 (file)
@@ -796,7 +796,7 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
             }
             
             $hash = $this->generateOathKey();
-            print_r($hash);exit;
+            
             $_SESSION[__CLASS__] = 
                 isset($_SESSION[__CLASS__]) ? 
                     $_SESSION[__CLASS__] : array();
@@ -812,7 +812,10 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
                 $roo->jerr('Fail to generate QR Code');
             }
             
-            $roo->jok($qrcode);
+            $roo->jdata(array(
+                'secret' => $hash,
+                'image' => $qrcode
+            ));
         }
         
         if(!empty($q['two_factor_auth_code'])) {