diff --git a/module/user/model.php b/module/user/model.php index 28535ed2ca..477d66c402 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -68,6 +68,23 @@ class userModel extends model if(strpos($params, 'withguest') !== false) $users = $users + array('guest' => 'Guest'); return $users; } + + /** + * Get commiters from the user table. + * + * @access public + * @return array + */ + public function getCommiters() + { + $rawCommiters = $this->dao->select('commiter, account, realname')->from(TABLE_USER)->where('commiter')->ne('')->fetchAll(); + if(!$rawCommiters) return array(); + + $commiters = array(); + foreach($rawCommiters as $commiter) $commiters[$commiter->commiter] = $commiter->realname ? $commiter->realname : $commiter->account; + + return $commiters; + } /** * Appened deleted users to the user list.