From 3f238e4e1676210f560f653c15cfa0be5c048d34 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 18 Apr 2011 10:13:54 -0400 Subject: [PATCH] redirect if you're already logged in. --- plugins/EmailRegistration/emailregister.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/EmailRegistration/emailregister.php b/plugins/EmailRegistration/emailregister.php index 22e8d59424..02b78ba936 100644 --- a/plugins/EmailRegistration/emailregister.php +++ b/plugins/EmailRegistration/emailregister.php @@ -164,6 +164,13 @@ class EmailregisterAction extends Action function handle($argarray=null) { + $cur = common_current_user(); + + if (!empty($cur)) { + common_redirect(common_local_url('all', array('nickname' => $cur->nickname))); + return; + } + switch ($this->state) { case self::NEWREGISTER: $this->showRegistrationForm();