Many misc fixes

This commit is contained in:
Deon George
2012-02-22 19:15:46 +11:00
parent f0f6479ca2
commit d9c3394b0f
14 changed files with 47 additions and 18 deletions

View File

@@ -130,8 +130,8 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
// If the user posted their details to reset their password
if ($_POST) {
// If the email address is correct, create a method token
if (! empty($_POST['email']) AND ($ao=ORM::factory('account',array('email'=>$_POST['email']))) AND $ao->loaded()) {
// If the username is correct, create a method token
if (! empty($_POST['username']) AND ($ao=ORM::factory('account',array('username'=>$_POST['username']))) AND $ao->loaded()) {
$mmto = ORM::factory('module_method_token')
->method(array('account','user_resetpassword'))
->account($ao)
@@ -164,7 +164,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
}
// Show our token screen even if the email was invalid.
if (isset($_POST['email']))
if (isset($_POST['username']))
Block::add(array(
'title'=>_('Reset your password'),
'body'=>View::factory('login_reset_sent'),