|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:31:30
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11908
Modified Files:
include.php
Log Message:
Login is working with the new schema -- really, this time :)
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- include.php 2001/08/25 18:28:47 1.40
+++ include.php 2001/08/25 18:31:27 1.41
@@ -296,7 +296,7 @@
}
break;
case 'owner' :
- $q->query("Select user_id, email from user where user_level > 1 order by email");
+ $q->query("select user_id, email from auth_user where user_level > 1 order by email");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
@@ -442,7 +442,7 @@
// Check to see if the user is trying to login
if (isset($HTTP_POST_VARS['login'])) {
if (isset($HTTP_POST_VARS['sendpass'])) {
- list($email, $password) = $q->grab("select email, password from user where email = '$username' and user_level > 0");
+ list($email, $password) = $q->grab("select email, password from auth_user where login = '$username' and active > 0");
if (!$q->num_rows()) {
$t->set_var(array(
'loginerrorcolor' => '#ff0000',
@@ -452,7 +452,7 @@
if (ENCRYPTPASS) {
$password = genpassword(10);
$mpassword = md5($password);
- $q->query("update user set password = '$mpassword' where email = '$username'");
+ $q->query("update user set password = '$mpassword' where login = '$username'");
}
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
|