Commit ac8c8982 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols
Browse files

Test for presence of remoteusername for username validation (bug #640316).


Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 324341dc
...@@ -175,7 +175,8 @@ function edituser_site_validate(Pieform $form, $values) { ...@@ -175,7 +175,8 @@ function edituser_site_validate(Pieform $form, $values) {
} }
// Check that the external username isn't already in use // Check that the external username isn't already in use
if ($usedby = get_record_select('auth_remote_user', if (isset($values['remoteusername']) &&
$usedby = get_record_select('auth_remote_user',
'authinstance = ? AND remoteusername = ? AND localusr != ?', 'authinstance = ? AND remoteusername = ? AND localusr != ?',
array($values['authinstance'], $values['remoteusername'], $values['id'])) array($values['authinstance'], $values['remoteusername'], $values['id']))
) { ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment