DataObjects/Core_person.php
authorjohn <john@roojs.com>
Wed, 10 Oct 2018 08:17:13 +0000 (16:17 +0800)
committerjohn <john@roojs.com>
Wed, 10 Oct 2018 08:17:13 +0000 (16:17 +0800)
DataObjects/Core_person.php

index e574c59..6233ede 100644 (file)
@@ -528,9 +528,14 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
     
     function checkTwoFactorAuthentication($val, $oath_key)
     {
+        // also used in login
+        
         require_once 'System.php';
         
-        if(empty($this->id)) {
+        if(
+            empty($this->id) ||
+            empty($oath_key)
+        ) {
             return false;
         }