From 2f101c958ea0626e17279548261a39e0fb286daf Mon Sep 17 00:00:00 2001 From: "Duck (Jakob Munih)" Date: Thu, 2 Jul 2009 11:39:02 +0200 Subject: [PATCH] Avoid access by registered users --- folks/account/resetpassword.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/folks/account/resetpassword.php b/folks/account/resetpassword.php index f680ef1d8..835b655f6 100644 --- a/folks/account/resetpassword.php +++ b/folks/account/resetpassword.php @@ -28,6 +28,12 @@ function _getCAPTCHA($new = false) return $_SESSION['folks']['CAPTCHA']; } +// We are already logged +if (Auth::isAuthenticated()) { + header('Location: ' . Folks::getUrlFor('user', Auth::getAuth())); + exit; +} + // Make sure auth backend allows passwords to be reset. $auth = Auth::singleton($conf['auth']['driver']); if (!$auth->hasCapability('resetpassword')) { -- 2.11.0