diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index c7c062066..d42f42e4a 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -17,6 +17,7 @@ define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/poli define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/'); define('USER_MANUAL_URL' , 'http://sourcefabric.booktype.pro/airtime-pro-for-broadcasters'); define('AIRTIME_TRANSIFEX_URL' , 'https://www.transifex.com/projects/p/airtime/'); +define('WHMCS_PASSWORD_RESET_URL' , 'https://account.sourcefabric.com/pwreset.php'); define('LICENSE_VERSION' , 'GNU AGPL v.3'); define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html'); diff --git a/airtime_mvc/application/controllers/LoginController.php b/airtime_mvc/application/controllers/LoginController.php index face87056..e11cc3233 100644 --- a/airtime_mvc/application/controllers/LoginController.php +++ b/airtime_mvc/application/controllers/LoginController.php @@ -158,19 +158,21 @@ class LoginController extends Zend_Controller_Action } $user = $query->findOne(); - if (!empty($user)) { - $auth = new Application_Model_Auth(); + if (!empty($user)) { + $auth = new Application_Model_Auth(); - $success = $auth->sendPasswordRestoreLink($user, $this->view); - if ($success) { - $this->_helper->redirector('password-restore-after', 'login'); + $success = $auth->sendPasswordRestoreLink($user, $this->view); + if ($success) { + $this->_helper->redirector('password-restore-after', 'login'); + } else { + $form->email->addError($this->view->translate(_("Email could not be sent. Check your mail server settings and ensure it has been configured properly."))); + } } else { $form->email->addError($this->view->translate(_("There was a problem sending the recovery email."))); } } else { - $form->email->addError($this->view->translate(_("We couldn't find the email you entered - you can also try here."))); + $form->email->addError($this->view->translate(_("We couldn't find the email you entered - you can also try here."))); } - } $this->view->form = $form; } diff --git a/airtime_mvc/application/views/scripts/form/password-restore.phtml b/airtime_mvc/application/views/scripts/form/password-restore.phtml index a43b9fe36..db7c4e491 100644 --- a/airtime_mvc/application/views/scripts/form/password-restore.phtml +++ b/airtime_mvc/application/views/scripts/form/password-restore.phtml @@ -1,36 +1,36 @@
-
-
- -
-
- element->getElement('username') ?> -
- -
- -
-
- element->getElement('email') ?> -
- element->getElement('email')->hasErrors()): ?> - - - -
 
-
- element->getElement('submit') ?> -
-
- element->getElement('cancel') ?> -
+
+
+
+ +
+
+ element->getElement('email') ?> +
+ element->getElement('email')->hasErrors()): ?> +
    + element->getElement('email')->getMessages() as $error): ?> +
  • + +
+ + + + +
+ element->getElement('username') ?> +
+ +
 
+
+ element->getElement('submit') ?> +
+
+ element->getElement('cancel') ?> +
\ No newline at end of file