equal
deleted
inserted
replaced
22 */ |
22 */ |
23 |
23 |
24 function checkusername($name) |
24 function checkusername($name) |
25 { |
25 { |
26 global $db, $session, $paths, $template, $plugins; // Common objects |
26 global $db, $session, $paths, $template, $plugins; // Common objects |
|
27 $name = str_replace('_', ' ', $name); |
27 $q = $db->sql_query('SELECT username FROM ' . table_prefix.'users WHERE username=\'' . $db->escape(rawurldecode($name)) . '\''); |
28 $q = $db->sql_query('SELECT username FROM ' . table_prefix.'users WHERE username=\'' . $db->escape(rawurldecode($name)) . '\''); |
28 if ( !$q ) |
29 if ( !$q ) |
29 { |
30 { |
30 die(mysql_error()); |
31 die(mysql_error()); |
31 } |
32 } |