Small code fixes in API code
This commit is contained in:
@@ -24,7 +24,7 @@ if ($API_mailsettings->request_method === 'PUT') {
|
||||
'mail_smtp_pass' => ['type' => 'string']
|
||||
];
|
||||
# check if the password is changed
|
||||
$updatePassword = str_contains($API_mailsettings->postedData['mail_smtp_pass'], '******') ? false : true;
|
||||
$updatePassword = !str_contains($API_mailsettings->postedData['mail_smtp_pass'], '******');
|
||||
if ($updatePassword) {
|
||||
if (strlen($API_mailsettings->postedData['mail_smtp_pass']) < 12) {
|
||||
$API_mailsettings->apiOutput(400, ['error' => 'Password too short']);
|
||||
|
||||
Reference in New Issue
Block a user