Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv31065
Modified Files:
serendipity_functions.inc.php serendipity_db_mysql.inc.php
Log Message:
Fixing problem: If two users shared the same username and password, then authorid would not get set.
There is still a problem identifying the correct user. We should not allow users to have the same username!!!
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- serendipity_functions.inc.php 16 Aug 2003 20:11:07 -0000 1.135
+++ serendipity_functions.inc.php 16 Aug 2003 21:26:42 -0000 1.136
@@ -1876,12 +1876,12 @@
WHERE
username = '$username'
AND password = '$password'";
- $row = serendipity_db_query($query, true);
+ $row = serendipity_db_query($query, true, 'assoc');
if (is_string($row)) {
print $row;
}
-
+
if ($row) {
$_SESSION['serendipityUser'] = $serendipity['serendipityUser'] = $username;
$_SESSION['serendipityEmail'] = $serendipity['serendipityEmail'] = $row['email'];
Index: serendipity_db_mysql.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_mysql.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- serendipity_db_mysql.inc.php 30 Jul 2003 16:38:35 -0000 1.11
+++ serendipity_db_mysql.inc.php 16 Aug 2003 21:26:42 -0000 1.12
@@ -47,6 +47,10 @@
return mysql_fetch_array($c, $result_type);
}
default:
+ if ($single) {
+ return mysql_fetch_array($c, $result_type);
+ }
+
$rows = array();
while (($row = mysql_fetch_array($c, $result_type))) {
$rows[] = $row;
|