Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv25239
Modified Files:
serendipity_functions.inc.php
Log Message:
Fixed missing authorid problem
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- serendipity_functions.inc.php 21 Jan 2004 07:31:03 -0000 1.180
+++ serendipity_functions.inc.php 21 Jan 2004 08:40:54 -0000 1.181
@@ -15,7 +15,11 @@
function serendipity_login() {
global $serendipity;
- if ( $_SESSION['serendipityAuthedUser'] === true ) {
+ if ( serendipity_authenticate_author("", "") ) {
+ #The session has this data already
+ #we previously just checked the value of $_SESSION['serendipityAuthedUser'] but
+ #we need the authorid still, so call serendipity_authenticate_author with blank
+ #params
return true;
}
@@ -30,7 +34,6 @@
serendipity_setCookie('author_information', base64_encode($package));
return true;
}
-
} elseif ( isset($serendipity['COOKIE']['author_information']) ) {
$cookie = unserialize(base64_decode($serendipity['COOKIE']['author_information']));
if ( serendipity_authenticate_author($cookie['username'], $cookie['password']) ) {
@@ -39,7 +42,6 @@
serendipity_deleteCookie('author_information');
return false;
}
-
}
}
|