Improve user profile
This commit is contained in:
@@ -145,6 +145,19 @@ class Project extends CI_Model {
|
||||
return $this->_addShortNames($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts all projects.
|
||||
*
|
||||
* @param string $userId
|
||||
* @return integer
|
||||
*/
|
||||
public function count($userId = false) {
|
||||
if ($userId) {
|
||||
$this->db->where('owner', $userId);
|
||||
}
|
||||
return $this->db->count_all_results('projects');
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts all experiments for the specified project.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user