+ add getGroups() method.

This commit is contained in:
wangchunsheng
2010-03-29 07:10:47 +00:00
parent b8a920efb6
commit 507b02e77e
+6
View File
@@ -223,6 +223,12 @@ class userModel extends model
return (isset($_SESSION['user']) and !empty($_SESSION['user']) and $_SESSION['user']->account != 'guest');
}
/* 获得用户所属的分组。*/
public function getGroups($account)
{
return $this->dao->findByAccount($account)->from(TABLE_USERGROUP)->fields('`group`')->fetchPairs();
}
/* 获得用户参与的项目列表。*/
public function getProjects($account)
{