Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Services_User_Record.php #641

Merged
merged 1 commit into from Jan 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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