Minor internal fixes

This commit is contained in:
Deon George
2014-10-04 00:35:26 +10:00
parent a7ed6672e1
commit f679bf9c06
9 changed files with 44 additions and 28 deletions

View File

@@ -24,7 +24,13 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
if ($ao->activated())
HTTP::redirect('login');
elseif ($ao->activate_code() == $this->request->post('code')) {
elseif (! $ao->active) {
SystemMessage::factory()
->title(_('Account NOT Activated'))
->type('warning')
->body(_('Your account cannot been activated, please contact us.'));
} elseif ($ao->activate_code() == $this->request->post('code')) {
$ao->verified = TRUE;
$ao->save();
@@ -32,9 +38,9 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
->title(_('Account Activated'))
->type('info')
->body(_('Your account has been activated.'));
HTTP::redirect('welcome');
}
HTTP::redirect('welcome');
}
} elseif (! $this->request->param('id'))
@@ -44,7 +50,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
->title('Activate account')
->title_icon('fa-wrench')
->type('form-horizontal')
->body(View::factory('login/activate')->set('o',Session::instance()->get_once('activate')));
->body(View::factory('login/activate')->set('o',Session::instance()->get_once('activate'))->set('email',$this->request->query('email')));
}
/**