* when get pairs, add the status condition.

This commit is contained in:
wangchunsheng
2010-02-26 03:01:32 +00:00
parent 6a9ede8f56
commit 287a96d1f7

View File

@@ -47,7 +47,7 @@ class userModel extends model
public function getPairs($params = '', $companyID = 0)
{
if($companyID == 0) $companyID = $this->app->company->id;
$users = $this->dao->select('account, realname')->from(TABLE_USER)->where('company')->eq((int)$companyID)->orderBy('account')->fetchPairs();
$users = $this->dao->select('account, realname')->from(TABLE_USER)->where('company')->eq((int)$companyID)->andWhere('status')->eq('active')->orderBy('account')->fetchPairs();
foreach($users as $account => $realName)
{
$firstLetter = ucfirst(substr($account, 0, 1)) . ':';