mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-01 01:53:32 +03:00
Added new admin login text input (Admin/Security)
Themes now work for admin panel too.
This commit is contained in:
parent
8cf8b94d39
commit
adb92ba3ef
7 changed files with 162 additions and 82 deletions
|
|
@ -1286,7 +1286,7 @@ class Actions
|
|||
$sStaticCache = \md5(APP_VERSION.$this->Plugins()->Hash());
|
||||
|
||||
$sTheme = $this->ValidateTheme($sTheme);
|
||||
$sNewThemeLink = './?/Css/0/'.($bAdmin ? 'Admin' : 'User').'/-/'.($bAdmin ? 'Default' : $sTheme).'/-/'.$sStaticCache.'/';
|
||||
$sNewThemeLink = './?/Css/0/'.($bAdmin ? 'Admin' : 'User').'/-/'.$sTheme.'/-/'.$sStaticCache.'/';
|
||||
|
||||
$bUserLanguage = false;
|
||||
if (!$bAdmin && !$aResult['Auth'] && !empty($_COOKIE['rllang']) &&
|
||||
|
|
@ -2705,19 +2705,26 @@ class Actions
|
|||
|
||||
$sLogin = \trim($this->GetActionParam('Login', ''));
|
||||
$sPassword = $this->GetActionParam('Password', '');
|
||||
$sNewPassword = $this->GetActionParam('NewPassword', '');
|
||||
|
||||
$this->Logger()->AddSecret($sPassword);
|
||||
$this->Logger()->AddSecret($sNewPassword);
|
||||
|
||||
$sNewPassword = $this->GetActionParam('NewPassword', '');
|
||||
if (0 < \strlen(\trim($sNewPassword)))
|
||||
{
|
||||
$this->Logger()->AddSecret($sNewPassword);
|
||||
}
|
||||
|
||||
if ($oConfig->ValidatePassword($sPassword))
|
||||
{
|
||||
if (0 < strlen($sLogin))
|
||||
if (0 < \strlen($sLogin))
|
||||
{
|
||||
$oConfig->Set('security', 'admin_login', $sLogin);
|
||||
}
|
||||
|
||||
$oConfig->SetPassword($sNewPassword);
|
||||
if (0 < \strlen(\trim($sNewPassword)))
|
||||
{
|
||||
$oConfig->SetPassword($sNewPassword);
|
||||
}
|
||||
|
||||
$bResult = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue