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

index 64a6588..60a0525 100644 (file)
@@ -1345,7 +1345,7 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
         
         $issuer = (empty($this->name)) ? rawurlencode('ROOJS') : rawurlencode($this->name);
         
-        $uri = "otpauth://totp/ACME%20Co:{$this->email}?secret={$this->oath_key}&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30";
+        $uri = "otpauth://totp/{$issuer}:{$this->email}?secret={$this->oath_key}&issuer={$issuer}&algorithm=SHA1&digits=6&period=30";
         
         $base64 = base64_encode(file_get_contents("https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl={$uri}"));