mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 19:52:20 +01:00
Refactor.
- str sub instead of concat
This commit is contained in:
parent
8991c2c0c4
commit
a0de5b9fd5
@ -164,11 +164,11 @@ class SyncLib
|
|||||||
|
|
||||||
function getLocalParams($yk_publicname)
|
function getLocalParams($yk_publicname)
|
||||||
{
|
{
|
||||||
$this->log(LOG_DEBUG, "searching for yk_publicname " . $yk_publicname . " in local db");
|
$this->log(LOG_DEBUG, "searching for yk_publicname $yk_publicname in local db");
|
||||||
$res = $this->db->findBy('yubikeys', 'yk_publicname', $yk_publicname, 1);
|
$res = $this->db->findBy('yubikeys', 'yk_publicname', $yk_publicname, 1);
|
||||||
|
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
$this->log(LOG_NOTICE, 'Discovered new identity ' . $yk_publicname);
|
$this->log(LOG_NOTICE, "Discovered new identity $yk_publicname");
|
||||||
$this->db->save('yubikeys', array(
|
$this->db->save('yubikeys', array(
|
||||||
'active'=>1,
|
'active'=>1,
|
||||||
'created'=>time(),
|
'created'=>time(),
|
||||||
@ -199,7 +199,7 @@ class SyncLib
|
|||||||
$this->log(LOG_INFO, "yubikey found in db ", $localParams);
|
$this->log(LOG_INFO, "yubikey found in db ", $localParams);
|
||||||
return $localParams;
|
return $localParams;
|
||||||
} else {
|
} else {
|
||||||
$this->log(LOG_NOTICE, 'params for yk_publicname ' . $yk_publicname . ' not found in database');
|
$this->log(LOG_NOTICE, "params for yk_publicname $yk_publicname not found in database");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user