Author: sevein
Date: Thu Aug 16 11:43:19 2012
New Revision: 12120
Log:
Redirect to main page if user is already logged in
Modified:
trunk/apps/qubit/modules/user/actions/loginAction.class.php
Modified: trunk/apps/qubit/modules/user/actions/loginAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/user/actions/loginAction.class.php Thu Aug 16
09:31:49 2012 (r12119)
+++ trunk/apps/qubit/modules/user/actions/loginAction.class.php Thu Aug 16
11:43:19 2012 (r12120)
@@ -22,9 +22,14 @@
public function execute($request)
{
$this->form = new sfForm;
-
$this->form->getValidatorSchema()->setOption('allow_extra_fields', true);
+ // Redirect to @homepage if the user is already authenticated
+ if ($this->context->user->isAuthenticated())
+ {
+ $this->redirect('@homepage');
+ }
+
// Redirect to the current URI in case we're forwarded to the login page
$this->form->setDefault('next', $request->getUri());
if ('user' == $request->module && 'login' == $request->action)
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.