Skip to content
Snippets Groups Projects
Commit 42d7b533 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix consultation navigation handling, fixes #288

parent 1e4f9fc7
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,13 @@ abstract class ConsultationController extends AuthenticatedController
{
parent::before_filter($action, $args);
$this->range = Context::get() ?: User::findByUsername(Request::username('username', $GLOBALS['user']->username));
if (Request::submitted('username')) {
$this->range = User::findByUsername(Request::username('username'));
} elseif (Request::submitted('cid')) {
$this->range = Context::get();
} else {
$this->range = $GLOBALS['user']->getAuthenticatedUser();
}
if ($this->range instanceof User) {
URLHelper::addLinkParam('username', $this->range->username);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment