remove a buggy line from AccessHandler.pm.

change the user home view to accept a userid. wip
This commit is contained in:
hyung-hwan 2016-12-02 08:40:42 +00:00
parent a9d04235ac
commit 7dfb4fbd7a
2 changed files with 9 additions and 6 deletions

View File

@ -187,7 +187,6 @@ sub authenticate_ldap
last search_loop; last search_loop;
} }
} }
if ($authenticated >= 2) last;
} }
} }
$res->abandon(); $res->abandon();

View File

@ -27,13 +27,17 @@ class User extends Controller
return $this->home (); return $this->home ();
} }
function home () function home ($userid = '')
{ {
$login = $this->login->getUser (); $login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '') if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
{
redirect ('main/signin'); redirect ('main/signin');
return;
}
if ($login['id'] == '') if ($userid == '') $userid = $login['id'];
if ($userid == '')
{ {
redirect ('site/home'); redirect ('site/home');
return; return;
@ -45,10 +49,10 @@ class User extends Controller
$this->load->model ('ProjectModel', 'projects'); $this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues'); $this->load->model ('IssueModel', 'issues');
$projects = $this->projects->getMyProjects ($login['id']); $projects = $this->projects->getMyProjects ($userid);
$issues = $this->issues->getMyIssues ( $issues = $this->issues->getMyIssues (
$login['id'], $this->issuehelper->_get_open_status_array($this->lang)); $userid, $this->issuehelper->_get_open_status_array($this->lang));
if ($projects === FALSE || $issues === FALSE) if ($projects === FALSE || $issues === FALSE)
{ {
$data['login'] = $login; $data['login'] = $login;