strtolower on usernames in migration.

This commit is contained in:
Mausern Testbruker committed 2011-08-29 20:46:53 +02:00
1 parent 5b073c26e2
commit 8b1d6b846a
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ $current_username = getCurrentUserName();
<form id="form_migrate" target="" method="post">
<div>
<label for="id_username">Brukernavn</label>*<br />
<input id="id_username" type="text" name="username" value="<?php echo $current_username;?>"><br />
<input id="id_username" type="text" name="username" value="<?php echo strtolower($current_username);?>"><br />
<label for="id_password">Passord</label>*<br />
<input id="id_password" type="password" name="password" value=""><br />
<label for="id_password_check">Passord (bekreft)</label>*<br />
+2 -1
View File
@@ -8,10 +8,11 @@ $current_username = getCurrentUserName();
/* Check for username availability.
* - You are the owner of the username (the logged in user).
* - The username is not allready taken. */
if ( ! user_exists($_GET['username']) || $_GET['username'] == $current_username) {
if ( ! user_exists($_GET['username']) || $_GET['username'] == strtolower($current_username)) {
echo "true";
}
else {
echo "false";
}
?>