Browse Source

Merge pull request #23 from ohartl/patch-1

Fix missing lowercae conversion for username and domain
Thomas Leister 9 years ago
parent
commit
7b5c09d3ec
1 changed files with 4 additions and 1 deletions
  1. 4 1
      include/php/pages/admin/edituser.php

+ 4 - 1
include/php/pages/admin/edituser.php

@@ -61,7 +61,10 @@
 		else if($savemode === "create"){
 		else if($savemode === "create"){
 			// Create mode entered
 			// Create mode entered
 			$username = $db->escape_string($_POST['username']);
 			$username = $db->escape_string($_POST['username']);
+			$username = strtolower($username);
 			$domain = $db->escape_string($_POST['domain']);
 			$domain = $db->escape_string($_POST['domain']);
+			$domain = strtolower($domain);
+
 			if(defined('DBC_USERS_MAILBOXLIMIT')){
 			if(defined('DBC_USERS_MAILBOXLIMIT')){
 				$mailbox_limit = $db->escape_string($_POST['mailbox_limit']);	
 				$mailbox_limit = $db->escape_string($_POST['mailbox_limit']);	
 			}
 			}
@@ -166,7 +169,7 @@
 	
 	
 	<tr>
 	<tr>
 		<td>
 		<td>
-			<input name="username" class="textinput" type="text" autofocus value="<?php if(isset($username)){echo strip_tags($username);} ?>" placeholder="Username" required="required"/>
+			<input name="username" class="textinput" type="text" autofocus value="<?php if(isset($username)){echo strtolower(strip_tags($username));} ?>" placeholder="Username" required="required"/>
 		</td>
 		</td>
 		
 		
 		<td>
 		<td>