Skip to content

Commit

Permalink
Added a check for a duplciate user in the manage create user page.
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@650 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Jan 16, 2002
1 parent 24a43e0 commit 5a8f811
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -30,6 +30,7 @@ Mantis
* Added support to move bugs from one project to another.
* Added email check to admin_check.php3
* Added a check to make sure the cookie_string really is unique.
* Added a check for a duplciate user in the manage create user page.
* Removed site_settings pages.
* Removed unused cookie variables.
* Removed sql_to_unix_time() function. Unecessary with removal of TIMESTAMPS.
Expand Down
11 changes: 11 additions & 0 deletions manage_create_new_user.php
Expand Up @@ -10,6 +10,17 @@
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
check_access( ADMINISTRATOR );

# Check for duplicate username
$query = "SELECT username
FROM $g_mantis_user_table
WHERE username='$f_username'";
$result = db_query( $query );
if ( db_num_rows( $result ) > 0 ) {
PRINT "$f_username $s_duplicate_username<p>";
PRINT "<a href=\"$g_manage_create_user_page\">$s_proceed</a>";
exit;
}

if ( $f_password != $f_password_verify ) {
echo "ERROR: passwords do not match";
exit;
Expand Down

0 comments on commit 5a8f811

Please sign in to comment.