forked from science-ation/science-ation
commit daves changes from earlier today
This commit is contained in:
parent
86d4e37448
commit
a7e2d840bc
@ -48,7 +48,7 @@ function getJudgingTeams()
|
|||||||
|
|
||||||
while($mr=mysql_fetch_object($mq))
|
while($mr=mysql_fetch_object($mq))
|
||||||
{
|
{
|
||||||
$u = user_load($mr->judges_id, true);
|
$u = user_load($mr->judges_id, false);
|
||||||
$judgelangs = join('/', $u['languages']);
|
$judgelangs = join('/', $u['languages']);
|
||||||
|
|
||||||
$teams[$lastteamid]['members'][]=array(
|
$teams[$lastteamid]['members'][]=array(
|
||||||
|
@ -78,11 +78,15 @@ if(array_key_exists('username',$_GET)) {
|
|||||||
$username = $_GET['username'];
|
$username = $_GET['username'];
|
||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
$un = mysql_escape_string($username);
|
$un = mysql_escape_string($username);
|
||||||
$q = mysql_query("SELECT id,MAX(year),deleted FROM users WHERE username='$un'");
|
$q = mysql_query("SELECT id,MAX(year),deleted FROM users WHERE username='$un' GROUP BY uid");
|
||||||
$r = mysql_fetch_object($q);
|
echo mysql_error();
|
||||||
if($r->deleted == 'no') {
|
|
||||||
echo "Username already exists.";
|
if(mysql_num_rows($q)) {
|
||||||
exit;
|
$r = mysql_fetch_object($q);
|
||||||
|
if($r->deleted == 'no') {
|
||||||
|
echo "Username already exists.";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$u = user_create($type, $username);
|
$u = user_create($type, $username);
|
||||||
$u['email'] = $username;
|
$u['email'] = $username;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user