mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Added MFA support
Added the option to enable/disable TOTP MFA per user using QR code or manually entering a key.
This commit is contained in:
parent
5c45a61faa
commit
05ddfa9114
8 changed files with 220 additions and 26 deletions
|
|
@ -145,11 +145,13 @@ class Settings
|
|||
'encryption' => 'sha512',
|
||||
'password' => hash('sha512', $this->userPassword),
|
||||
'role' => 'admin',
|
||||
'mfa_secret' => 'disabled',
|
||||
), $userFile);
|
||||
} else {
|
||||
$userFile = $this->overwriteINI(array(
|
||||
"password" => $this->userPassword,
|
||||
'role' => 'admin',
|
||||
'mfa_secret' => 'disabled',
|
||||
), $userFile);
|
||||
}
|
||||
file_put_contents("config/users/" . $this->user . ".ini", $userFile, LOCK_EX);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue