* Finish task#8760.
This commit is contained in:
@@ -46,6 +46,25 @@ class userModel extends model
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user information by accounts.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param string $keyField
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getListByAccounts($accounts = array(), $keyField = 'id')
|
||||
{
|
||||
if(empty($accounts)) return array();
|
||||
|
||||
return $this->dao->select('id,account,realname,role')->from(TABLE_USER)
|
||||
->where('account')->in($accounts)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('type')->eq('inside')
|
||||
->fetchAll($keyField);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the account=>realname pairs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user