* Finish task#8760.

This commit is contained in:
leiyong
2020-12-30 17:29:32 +08:00
parent c57651813a
commit fef12243f1
25 changed files with 697 additions and 321 deletions
+19
View File
@@ -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.
*