mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-02-22 21:30:56 +01:00
Fix wrong parameter call
This commit is contained in:
parent
6aa0134818
commit
50f956957c
@ -326,13 +326,13 @@ public function populate(Array $attrib = [])
|
||||
if (array_key_exists('digits', $attrib) && $attrib['digits'] > 0)
|
||||
{ $this->otp->setParameter( 'digits', (int) $attrib['digits'] ); }
|
||||
|
||||
if (array_key_exists('digest', $attrib) && $attrib['algorithm'])
|
||||
{ $this->otp->setParameter( 'digest', $attrib['algorithm'] ); }
|
||||
if (array_key_exists('algorithm', $attrib) && $attrib['algorithm'])
|
||||
{ $this->otp->setParameter( 'algorithm', $attrib['algorithm'] ); }
|
||||
|
||||
if (array_key_exists('totpPeriod', $attrib) && $attrib['totpPeriod'] && $attrib['otpType'] !== 'totp')
|
||||
if (array_key_exists('totpPeriod', $attrib) && $attrib['totpPeriod'] && $attrib['otpType'] === 'totp')
|
||||
{ $this->otp->setParameter( 'period', (int) $attrib['totpPeriod'] ); }
|
||||
|
||||
if (array_key_exists('hotpCounter', $attrib) && $attrib['hotpCounter'] && $attrib['otpType'] !== 'hotp')
|
||||
if (array_key_exists('hotpCounter', $attrib) && $attrib['hotpCounter'] && $attrib['otpType'] === 'hotp')
|
||||
{ $this->otp->setParameter( 'counter', (int) $attrib['hotpCounter'] ); }
|
||||
|
||||
if (array_key_exists('imageLink', $attrib) && $attrib['imageLink'])
|
||||
|
Loading…
Reference in New Issue
Block a user