Skip to content

Commit

Permalink
[fix] Adding login functionality back to com_users
Browse files Browse the repository at this point in the history
  • Loading branch information
zooley committed Jun 4, 2019
1 parent e6a4006 commit 689f91d
Show file tree
Hide file tree
Showing 142 changed files with 2,305 additions and 259 deletions.
2 changes: 1 addition & 1 deletion core/components/com_answers/site/controllers/questions.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function loginTask()
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false, true), 'server');

App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn), false),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn), false),
($this->getError() ? $this->getError() : null),
($this->getError() ? 'warning' : 'success')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<div class="addcomment comment-add<?php if (Request::getInt('reply', 0) != $this->comment->get('id')) { echo ' hide'; } ?>" id="comment-form<?php echo $this->depth . $this->comment->get('item_type') . $this->comment->get('id'); ?>">
<?php if (User::get('guest')) { ?>
<p class="warning">
<?php echo Lang::txt('COM_ANSWERS_PLEASE_LOGIN_TO_ANSWER', '<a href="' . Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($this->base, false, true))) . '">' . Lang::txt('COM_ANSWERS_LOGIN') . '</a>'); ?>
<?php echo Lang::txt('COM_ANSWERS_PLEASE_LOGIN_TO_ANSWER', '<a href="' . Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($this->base, false, true))) . '">' . Lang::txt('COM_ANSWERS_LOGIN') . '</a>'); ?>
</p>
<?php } else { ?>
<form id="cform<?php echo $this->depth . $this->comment->get('item_type') . $this->comment->get('id'); ?>" action="<?php echo Route::url($this->base); ?>" method="post" enctype="multipart/form-data">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
</form>
<?php } else { ?>
<p>
<?php echo Lang::txt('COM_ANSWERS_PLEASE_LOGIN_TO_ANSWER', '<a href="' . Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($this->question->link('answer'), false, true))) . '">' . Lang::txt('COM_ANSWERS_LOGIN') . '</a>'); ?>
<?php echo Lang::txt('COM_ANSWERS_PLEASE_LOGIN_TO_ANSWER', '<a href="' . Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($this->question->link('answer'), false, true))) . '">' . Lang::txt('COM_ANSWERS_LOGIN') . '</a>'); ?>
</p>
<?php } ?>
</div><!-- / .subject -->
Expand Down Expand Up @@ -461,7 +461,7 @@
<div class="container">
<p><a class="icon-add add btn" href="<?php
$route = Route::url($this->question->link('answer'), false, true);
echo (User::isGuest()) ? Route::url('index.php?option=com_login&return=' . base64_encode($route)) : $route;
echo (User::isGuest()) ? Route::url('index.php?option=com_users&view=login&return=' . base64_encode($route)) : $route;
?>"><?php echo Lang::txt('COM_ANSWERS_ANSWER_THIS'); ?></a></p>
</div><!-- / .container -->
<?php } ?>
Expand Down
8 changes: 4 additions & 4 deletions core/components/com_blog/site/controllers/entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function editTask($entry = null)
{
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option . '&task=' . $this->_task, false, true), 'server');
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn)),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),
Lang::txt('COM_BLOG_LOGIN_NOTICE'),
'warning'
);
Expand Down Expand Up @@ -240,7 +240,7 @@ public function saveTask()
{
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option . '&task=' . $this->_task), 'server');
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn)),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),
Lang::txt('COM_BLOG_LOGIN_NOTICE'),
'warning'
);
Expand Down Expand Up @@ -342,7 +342,7 @@ public function deleteTask()
{
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option, false, true), 'server');
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn)),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),
Lang::txt('COM_BLOG_LOGIN_NOTICE'),
'warning'
);
Expand Down Expand Up @@ -537,7 +537,7 @@ public function savecommentTask()
{
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option), 'server');
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn)),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),
Lang::txt('COM_BLOG_LOGIN_NOTICE'),
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_blog/site/views/entries/tmpl/entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
<input type="hidden" name="comment[content]" id="commentcontent" value="" />

<p class="warning">
<?php echo Lang::txt('COM_BLOG_MUST_LOG_IN', '<a href="' . Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($this->row->link() . '#post-comment', false, true))) . '">' . Lang::txt('COM_BLOG_LOG_IN') . '</a>'); ?>
<?php echo Lang::txt('COM_BLOG_MUST_LOG_IN', '<a href="' . Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($this->row->link() . '#post-comment', false, true))) . '">' . Lang::txt('COM_BLOG_LOG_IN') . '</a>'); ?>
</p>
<?php } ?>

Expand Down
2 changes: 1 addition & 1 deletion core/components/com_cart/site/controllers/checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ private function login($message = '')
{
$return = base64_encode($_SERVER['REQUEST_URI']);
App::redirect(
Route::url('index.php?option=com_login&return=' . $return),
Route::url('index.php?option=com_users&view=login&return=' . $return),
$message,
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_cart/site/controllers/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private function login($message = '')
{
$return = base64_encode($_SERVER['REQUEST_URI']);
App::redirect(
Route::url('index.php?option=com_login&return=' . $return),
Route::url('index.php?option=com_users&view=login&return=' . $return),
$message,
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_cart/site/controllers/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function loginTask()
{
$rtrn = Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_controller), 'server');
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($rtrn))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn))
);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ private function openUrl()
public function loginTask()
{
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&task=' . $this->_task, false, true))),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&task=' . $this->_task, false, true))),
Lang::txt('COM_CITATIONS_NOT_LOGGEDIN'),
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_citations/site/controllers/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function execute()
if (User::isGuest())
{
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&task=import', false, true))),
Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&task=import', false, true))),
Lang::txt('COM_CITATIONS_NOT_LOGGEDIN'),
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_collections/site/controllers/posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function loginTask()
{
$return = base64_encode(Request::getString('REQUEST_URI', Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task, false, true), 'server'));
App::redirect(
Route::url('index.php?option=com_login&return=' . $return, false)
Route::url('index.php?option=com_users&view=login&return=' . $return, false)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@
<?php } ?>
<?php } ?>
<?php } else { ?>
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($row->link(), false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($row->link(), false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_COLLECT'); ?></span>
</a>
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($row->link(), false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($row->link(), false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_FOLLOW'); ?></span>
</a>
<?php } ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
<span><?php echo Lang::txt('COM_COLLECTIONS_COLLECT'); ?></span>
</a>
<?php } else { ?>
<a class="btn vote like tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($base . '&controller=' . $this->controller . '&task=' . $this->task, false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_LIKE'); ?>">
<a class="btn vote like tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($base . '&controller=' . $this->controller . '&task=' . $this->task, false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_LIKE'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_LIKE'); ?></span>
</a>
<a class="btn comment" data-id="<?php echo $row->get('id'); ?>" href="<?php echo Route::url($base . '&controller=posts&post=' . $row->get('id') . '&task=comment'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_COMMENT'); ?></span>
</a>
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($base . '&controller=' . $this->controller . '&task=' . $this->task, false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($base . '&controller=' . $this->controller . '&task=' . $this->task, false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_COLLECT'); ?></span>
</a>
<?php } ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@
<?php } ?>
<?php } ?>
<?php } else { ?>
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($base . '&controller=posts&board=' . $this->collection->get('id') . '&task=collect', false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($base . '&controller=posts&board=' . $this->collection->get('id') . '&task=collect', false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_COLLECT'); ?></span>
</a>
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($this->collection->link() . '/follow')), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($this->collection->link() . '/follow')), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_FOLLOW'); ?></span>
</a>
<?php } ?>
Expand Down Expand Up @@ -377,10 +377,10 @@
<?php } ?>
<?php } ?>
<?php } else { ?>
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($base . '&controller=posts&board=' . $collection->get('id') . '&task=collect', false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<a class="btn repost tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($base . '&controller=posts&board=' . $collection->get('id') . '&task=collect', false, true)), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_COLLECT'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_COLLECT'); ?></span>
</a>
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_login&return=' . base64_encode(Route::url($collection->link() . '/follow')), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<a class="btn follow tooltips" href="<?php echo Route::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url($collection->link() . '/follow')), false); ?>" title="<?php echo Lang::txt('COM_COLLECTIONS_WARNING_LOGIN_TO_FOLLOW'); ?>">
<span><?php echo Lang::txt('COM_COLLECTIONS_FOLLOW'); ?></span>
</a>
<?php } ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
$menu = \App::get('menu');
$active = $menu->getActive();
$itemId = $active->id;
$link1 = Route::url('index.php?option=com_login&Itemid=' . $itemId);
$link1 = Route::url('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = Route::url(Components\Content\Site\Helpers\Route::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
$link = new Hubzero\Utility\Uri($link1);
$link->setVar('return', base64_encode(urlencode($returnURL)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
$menu = App::get('menu');
$active = $menu->getActive();
$itemId = $active->id;
$link = Route::url('index.php?option=com_login&Itemid=' . $itemId);
$link = Route::url('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = Route::url(Components\Content\Site\Helpers\Route::getArticleRoute($article->slug, $article->catid, $article->language));
$fullURL = new Hubzero\Utility\Uri($link);
$fullURL->setVar('return', base64_encode(urlencode($returnURL)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
$menu = App::get('menu');
$active = $menu->getActive();
$itemId = $active->id;
$link1 = Route::url('index.php?option=com_login&Itemid=' . $itemId);
$link1 = Route::url('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = Route::url(Component\Content\Site\Helpers\Route::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
$link = new Hubzero\Utility\Uri($link1);
$link->setVar('return', base64_encode(urlencode($returnURL)));
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_courses/site/controllers/course.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function loginTask($message = '')
$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&gid=' . $this->course->get('id') . '&task=' . $this->_task, false, true));

App::redirect(
Route::url('index.php?option=com_login&return=' . $return, false),
Route::url('index.php?option=com_users&view=login&return=' . $return, false),
$message,
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_courses/site/controllers/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public function authorize()
{
$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=form'));
App::redirect(
Route::url('index.php?option=com_login&return=' . $return),
Route::url('index.php?option=com_users&view=login&return=' . $return),
$message,
'warning'
);
Expand Down
2 changes: 1 addition & 1 deletion core/components/com_courses/site/controllers/offering.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function _buildTitle()
public function loginTask($message = '')
{
$rtrn = base64_encode(Route::url($this->course->offering()->link() . '&task=' . $this->_task, false, true));
$link = str_replace('&amp;', '&', Route::url('index.php?option=com_login&return=' . $rtrn));
$link = str_replace('&amp;', '&', Route::url('index.php?option=com_users&view=login&return=' . $rtrn));
App::redirect(
$link,
Lang::txt($message),
Expand Down
18 changes: 9 additions & 9 deletions core/components/com_developer/site/controllers/applications.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function displayTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ public function viewTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=view&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -156,7 +156,7 @@ public function editTask($application = null)
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=edit&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ public function saveTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=edit&id=' . $data['id'], false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -357,7 +357,7 @@ public function deleteTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=delete&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -426,7 +426,7 @@ public function resetClientSecretTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=view&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -477,7 +477,7 @@ public function revokeTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=view&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -523,7 +523,7 @@ public function revokeAllTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=view&id=' . $id, false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down Expand Up @@ -559,7 +559,7 @@ public function createPersonalAccessTask()
{
$return = Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=view&id=' . $id . '&active=tokens', false, true);
App::redirect(
Route::url('index.php?option=com_login&return=' . base64_encode($return))
Route::url('index.php?option=com_users&view=login&return=' . base64_encode($return))
);
return;
}
Expand Down
Loading

0 comments on commit 689f91d

Please sign in to comment.