[pLog-svn] r577 - plog/trunk/class/dao
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Sun Dec 26 02:22:50 GMT 2004
Author: subaochen
Date: 2004-12-26 02:22:47 +0000 (Sun, 26 Dec 2004)
New Revision: 577
Modified:
plog/trunk/class/dao/users.class.php
Log:
check if userinfo is null: null userinfo means we can not get userinfo, so just return blogId=0, this will used to redirect user to summary page in the future?
Modified: plog/trunk/class/dao/users.class.php
===================================================================
--- plog/trunk/class/dao/users.class.php 2004-12-23 23:38:23 UTC (rev 576)
+++ plog/trunk/class/dao/users.class.php 2004-12-26 02:22:47 UTC (rev 577)
@@ -432,7 +432,11 @@
$blogs = new Blogs();
$userinfo = $this->getUserInfoFromUsername($username);
+ // if userinfo is null, this maybe because username is not exists..
+ // return 0 means, should go to summary page
+ if(!$userinfo) return 0;
$userid = $userinfo->getId();
+ $userid = $userinfo->getId();
// check if the user is the owner of any blog
$owner = "SELECT id FROM ".$this->getPrefix()."blogs WHERE owner_id = ".$userid.";";
More information about the pLog-svn
mailing list