Skip to content
Snippets Groups Projects
Commit b0fedc9d authored by Demian Katz's avatar Demian Katz
Browse files

Block logged in users from creating accounts.

- Eliminates some follow-up problems in some edge cases.
parent 0dcf1954
No related merge requests found
...@@ -134,6 +134,10 @@ class MyResearchController extends AbstractBase ...@@ -134,6 +134,10 @@ class MyResearchController extends AbstractBase
*/ */
public function accountAction() public function accountAction()
{ {
// If the user is already logged in, don't let them create an account:
if ($this->getAuthManager()->isLoggedIn()) {
return $this->redirect()->toRoute('myresearch-home');
}
// if the current auth class proxies others, we'll get the proxied // if the current auth class proxies others, we'll get the proxied
// auth method as a querystring parameter. // auth method as a querystring parameter.
$method = trim($this->params()->fromQuery('auth_method')); $method = trim($this->params()->fromQuery('auth_method'));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment