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:
ian%hixie.ch 2001-11-10 20:43:44 +00:00
parent 755f8317fa
commit 760684e638

View File

@ -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;