Comment out console() calls, CS fixes

This commit is contained in:
Aleksander Machniak 2016-01-28 17:12:23 +01:00
parent f1eada2be3
commit 669feb6b02
4 changed files with 40 additions and 43 deletions

View file

@ -25,8 +25,8 @@ namespace Kolab2FA\Driver;
abstract class Base abstract class Base
{ {
public $method = null; public $method;
public $id = null; public $id;
public $storage; public $storage;
protected $config = array(); protected $config = array();
@ -34,7 +34,6 @@ abstract class Base
protected $user_props = array(); protected $user_props = array();
protected $pending_changes = false; protected $pending_changes = false;
protected $temporary = false; protected $temporary = false;
protected $allowed_props = array('username'); protected $allowed_props = array('username');
public $user_settings = array( public $user_settings = array(
@ -342,5 +341,4 @@ abstract class Base
{ {
return isset($this->props[$key]); return isset($this->props[$key]);
} }
} }

View file

@ -77,7 +77,7 @@ class HOTP extends Base
if (!strlen($secret)) { if (!strlen($secret)) {
// LOG: "no secret set for user $this->username" // LOG: "no secret set for user $this->username"
console("VERIFY HOTP: no secret set for user $this->username"); // rcube::console("VERIFY HOTP: no secret set for user $this->username");
return false; return false;
} }
@ -91,11 +91,11 @@ class HOTP extends Base
} }
catch (\Exception $e) { catch (\Exception $e) {
// LOG: exception // LOG: exception
console("VERIFY HOTP: $this->id, " . strval($e)); // rcube::console("VERIFY HOTP: $this->id, " . strval($e));
$pass = false; $pass = false;
} }
// console('VERIFY HOTP', $this->username, $secret, $counter, $code, $pass); // rcube::console('VERIFY HOTP', $this->username, $secret, $counter, $code, $pass);
return $pass; return $pass;
} }
@ -125,5 +125,4 @@ class HOTP extends Base
{ {
return mt_rand(1, 999); return mt_rand(1, 999);
} }
} }

View file

@ -71,7 +71,7 @@ class TOTP extends Base
if (!strlen($secret)) { if (!strlen($secret)) {
// LOG: "no secret set for user $this->username" // LOG: "no secret set for user $this->username"
console("VERIFY TOTP: no secret set for user $this->username"); // rcube::console("VERIFY TOTP: no secret set for user $this->username");
return false; return false;
} }
@ -93,7 +93,7 @@ class TOTP extends Base
} }
} }
// console('VERIFY TOTP', $this->username, $secret, $code, $timestamp, $pass); // rcube::console('VERIFY TOTP', $this->username, $secret, $code, $timestamp, $pass);
return $pass; return $pass;
} }
@ -102,12 +102,12 @@ class TOTP extends Base
*/ */
public function get_provisioning_uri() public function get_provisioning_uri()
{ {
console('PROV', $this->secret); // rcube::console('PROV', $this->secret);
if (!$this->secret) { if (!$this->secret) {
// generate new secret and store it // generate new secret and store it
$this->set('secret', $this->get('secret', true)); $this->set('secret', $this->get('secret', true));
$this->set('created', $this->get('created', true)); $this->set('created', $this->get('created', true));
console('PROV2', $this->secret); // rcube::console('PROV2', $this->secret);
$this->commit(); $this->commit();
} }

View file

@ -84,7 +84,7 @@ class Yubikey extends Base
} }
} }
console('VERIFY TOTP', $this->username, $keyid, $code, $pass); // rcube::console('VERIFY TOTP', $this->username, $keyid, $code, $pass);
return $pass; return $pass;
} }