Author: david
Date: 2008-11-26 15:11:19 -0800 (Wed, 26 Nov 2008)
New Revision: 1622
Modified:
trunk/qubit/lib/model/QubitUser.php
Log:
Add dummy "q_user.id is not null" criteria to QubitUser::getList() so
BasePeer::doCount() method has a table name to work from.
Modified: trunk/qubit/lib/model/QubitUser.php
===================================================================
--- trunk/qubit/lib/model/QubitUser.php 2008-11-26 23:07:17 UTC (rev 1621)
+++ trunk/qubit/lib/model/QubitUser.php 2008-11-26 23:11:19 UTC (rev 1622)
@@ -40,9 +40,9 @@
{
$roles = array();
foreach ($this->getUserRoleRelations() as $relation)
- {
+ {
$roles[] = $relation->getRole();
- }
+ }
return $roles;
}
@@ -51,31 +51,33 @@
{
return $this->getRoles();
}
-
+
public static function getList($culture, $options=array())
- {
- $criteria = new Criteria;
- $page = (isset($options['page'])) ? $options['page'] : 1;
-
- // Page results
+ {
+ $criteria = new Criteria;
+
+ $criteria->add(QubitUser::ID, null, Criteria::ISNOTNULL);
+ $page = (isset($options['page'])) ? $options['page'] : 1;
+
+ // Page results
$pager = new QubitPager('QubitUser');
$pager->setCriteria($criteria);
$pager->setPage($page);
$pager->init();
-
+
return $pager;
}
-
+
public static function checkCredentials($username, $password, &$error)
{
$validCreds = false;
$error = null;
-
+
// anonymous is not a real user
if ($username == 'anonymous')
{
$error = 'invalid username';
-
+
return null;
}
@@ -98,9 +100,9 @@
}
else
{
- $error = 'invalid username';
+ $error = 'invalid username';
}
-
+
return ($validCreds) ? $user : null;
}
} // User
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---