aboutsummaryrefslogtreecommitdiffstats
path: root/register.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--register.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/register.php b/register.php
index 6169d0704..c26511d02 100644
--- a/register.php
+++ b/register.php
@@ -47,12 +47,7 @@ if (isset($_POST['submit']))
if (count($errors) == 0)
{
- $query = '
-SELECT id
- FROM '.USERS_TABLE.'
- WHERE username = \''.$_POST['login'].'\'
-;';
- list($user_id) = mysql_fetch_array(pwg_query($query));
+ $user_id = get_userid($_POST['login']);
$session_id = session_create($user_id, $conf['session_length']);
$url = 'category.php?id='.$session_id;
redirect($url);