diff --git a/codepot/etc/perl/Codepot/AccessHandler.pm b/codepot/etc/perl/Codepot/AccessHandler.pm index bfbc38a5..05eecb00 100644 --- a/codepot/etc/perl/Codepot/AccessHandler.pm +++ b/codepot/etc/perl/Codepot/AccessHandler.pm @@ -187,7 +187,6 @@ sub authenticate_ldap last search_loop; } } - if ($authenticated >= 2) last; } } $res->abandon(); diff --git a/codepot/src/codepot/controllers/user.php b/codepot/src/codepot/controllers/user.php index 74d74992..ff3e2255 100644 --- a/codepot/src/codepot/controllers/user.php +++ b/codepot/src/codepot/controllers/user.php @@ -27,13 +27,17 @@ class User extends Controller return $this->home (); } - function home () + function home ($userid = '') { $login = $this->login->getUser (); - if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '') + if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '') + { redirect ('main/signin'); + return; + } - if ($login['id'] == '') + if ($userid == '') $userid = $login['id']; + if ($userid == '') { redirect ('site/home'); return; @@ -45,10 +49,10 @@ class User extends Controller $this->load->model ('ProjectModel', 'projects'); $this->load->model ('IssueModel', 'issues'); - $projects = $this->projects->getMyProjects ($login['id']); + $projects = $this->projects->getMyProjects ($userid); $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) { $data['login'] = $login;