Skip to content

Commit

Permalink
Update Services_User_Record.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweepr committed Apr 24, 2021
1 parent 9e53a03 commit 59d9704
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/services/User/Services_User_Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,22 @@ public function validateUserRecord($user, $isEdit)
$result->addError(_('Invalid username chosen'));
} // if
} // if

// Check if username contains left and right chevrons.
if (preg_match('/[<>]/i', $user['username'])) {
//(preg_match ('/[^a-zA-Z0-9]/i', $getname))
$result->addError(_('Lastname may not contain "<" or ">"'));
} // if

// Check if username contains left and right chevrons.
if (preg_match('/[<>]/i', $user['firstname'])) {
$result->addError(_('Lastname may not contain "<" or ">"'));
} // if

// Check if username contains left and right chevrons.
if (preg_match('/[<>]/i', $user['lastname'])) {
$result->addError(_('Lastname may not contain "<" or ">"'));
} // if

// Check a firstname is entered
if (strlen($user['firstname']) < 2) {
Expand Down

0 comments on commit 59d9704

Please sign in to comment.