mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
Return the user ID even when the user exists, so that there is no need for callers to check the return value.
This commit is contained in:
parent
755f8317fa
commit
760684e638
@ -108,6 +108,7 @@ sub setUser {
|
||||
if (defined($userID)) {
|
||||
$self->database($app)->execute('UPDATE user SET mode=?, password=?, adminMessage=?, newFieldID=?, newFieldValue=?, newFieldKey=?
|
||||
WHERE userID = ?', $mode, $password, $adminMessage, $newFieldID, $newFieldValue, $newFieldKey, $userID);
|
||||
return $userID;
|
||||
} else {
|
||||
return $self->database($app)->execute('INSERT INTO user SET mode=?, password=?, adminMessage=?, newFieldID=?, newFieldValue=?, newFieldKey=?',
|
||||
$mode, $password, $adminMessage, $newFieldID, $newFieldValue, $newFieldKey)->MySQLID;
|
||||
|
Loading…
Reference in New Issue
Block a user