Skip to content

Commit

Permalink
Merge 071a590 into 6489c49
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweepr committed Jan 1, 2021
2 parents 6489c49 + 071a590 commit 09e1712
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/services/User/Services_User_Record.php
Expand Up @@ -412,16 +412,16 @@ public function validateUserPreferences($prefs, $currentPrefs)
$prefs['notifications']['twitter']['request_token_secret'] = $currentPrefs['notifications']['twitter']['request_token_secret'];

// We don't want to save megabyts of CSS, so put a limit to the size
if (strlen($prefs['customcss'] > 1024 * 10)) {
if (strlen($prefs['customcss']) > 1024 * 10) {
$result->addError(_('Custom CSS is too large'));
} // if

// We don't want to save megabytes of default newspot body, so limit it
if (strlen($prefs['newspotdefault_tag'] > 90)) {
if (strlen($prefs['newspotdefault_tag']) > 90) {
$result->addError(_('Default value for a spots\' tag is too long'));
} // if

if (strlen($prefs['newspotdefault_body'] > 9000)) {
if (strlen($prefs['newspotdefault_body']) > 9000) {
$result->addError(_('Default value for a spots\' body is too long'));
} // if

Expand Down Expand Up @@ -507,7 +507,7 @@ public function validateUserRecord($user, $isEdit)
} // if

// Make sure a valid password is entered for existing users
if ((strlen($user['newpassword1'] > 0)) && ($isEdit)) {
if ((strlen($user['newpassword1']) > 0) && ($isEdit)) {
if (strlen($user['newpassword1']) < 5) {
$result->addError(_('Entered password is too short'));
} // if
Expand Down

0 comments on commit 09e1712

Please sign in to comment.