[pLog-svn] r5398 - plog/branches/lifetype-1.2/class/dao/userdata

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Sat May 12 22:08:48 EDT 2007


Author: jondaley
Date: 2007-05-12 22:08:47 -0400 (Sat, 12 May 2007)
New Revision: 5398

Modified:
   plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php
Log:
check for userInfo object before calling method.  Came across this while doing some xmlrpc stuff - I am probably passing in the wrong user name, but we should return false, rather than crash

Modified: plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php	2007-05-12 20:55:04 UTC (rev 5397)
+++ plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php	2007-05-13 02:08:47 UTC (rev 5398)
@@ -53,7 +53,7 @@
         function getUserInfo( $user, $pass )
         {
             $userInfo = $this->getUserInfoFromUsername( $user );
-            if ( $userInfo->getPassword() == md5($pass) ) {
+            if ( $userInfo && ($userInfo->getPassword() == md5($pass)) ) {
                 return $userInfo;
             } else {
                 return false;



More information about the pLog-svn mailing list