diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php index e49828d85bbe..3af275b668b8 100755 --- a/app/controllers/UserController.php +++ b/app/controllers/UserController.php @@ -26,9 +26,9 @@ class UserController extends BaseController { $user->force_pdfjs = true; $user->save(); - Session::flash('message', 'Successfully updated PDF settings'); + Session::flash('message', trans('texts.confide.updated_settings')); - return Redirect::to('/invoices/create'); + return Redirect::to('/dashboard'); } /** @@ -86,6 +86,7 @@ class UserController extends BaseController { if( Confide::user() ) { Event::fire('user.login'); + Session::reflash(); $invoice = Invoice::scope()->orderBy('id', 'desc')->first(); @@ -95,7 +96,7 @@ class UserController extends BaseController { } else { - return Redirect::to('/invoices/create'); + return Redirect::to('/dashboard'); } } else @@ -137,7 +138,7 @@ class UserController extends BaseController { // Check if there was too many login attempts if( Confide::isThrottled( $input ) ) { - $err_msg = Lang::get('confide::confide.alerts.too_many_attempts'); + $err_msg = trans('texts.confide.too_many_attempts'); } /* elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) ) @@ -147,7 +148,7 @@ class UserController extends BaseController { */ else { - $err_msg = Lang::get('confide::confide.alerts.wrong_credentials'); + $err_msg = trans('texts.confide.wrong_credentials'); } return Redirect::action('UserController@login') @@ -165,15 +166,13 @@ class UserController extends BaseController { { if ( Confide::confirm( $code ) ) { - $notice_msg = Lang::get('confide::confide.alerts.confirmation'); - return Redirect::action('UserController@login') - ->with( 'notice', $notice_msg ); + $notice_msg = trans('texts.confide.confirmation'); + return Redirect::action('UserController@login')->with( 'message', $notice_msg ); } else { - $error_msg = Lang::get('confide::confide.alerts.wrong_confirmation'); - return Redirect::action('UserController@login') - ->with( 'error', $error_msg ); + $error_msg = trans('texts.confide.wrong_confirmation'); + return Redirect::action('UserController@login')->with( 'error', $error_msg ); } } @@ -194,9 +193,9 @@ class UserController extends BaseController { { Confide::forgotPassword( Input::get( 'email' ) ); - $notice_msg = Lang::get('confide::confide.alerts.password_forgot'); - return Redirect::action('UserController@login') - ->with( 'notice', $notice_msg ); + $notice_msg = trans('texts.confide.password_forgot'); + return Redirect::action('UserController@login') + ->with( 'notice', $notice_msg ); /* @@ -241,15 +240,15 @@ class UserController extends BaseController { // By passing an array with the token, password and confirmation if( Confide::resetPassword( $input ) ) { - $notice_msg = Lang::get('confide::confide.alerts.password_reset'); - return Redirect::action('UserController@login') - ->with( 'notice', $notice_msg ); + $notice_msg = trans('texts.confide.password_reset'); + return Redirect::action('UserController@login') + ->with( 'notice', $notice_msg ); } else { - $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset'); - return Redirect::action('UserController@reset_password', array('token'=>$input['token'])) - ->withInput() + $error_msg = trans('texts.confide.wrong_password_reset'); + return Redirect::action('UserController@reset_password', array('token'=>$input['token'])) + ->withInput() ->with( 'error', $error_msg ); } } diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php index 4e18294698ec..549de74e0f2c 100644 --- a/app/lang/de/texts.php +++ b/app/lang/de/texts.php @@ -277,5 +277,15 @@ return array( 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), ); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index f9a64304f024..d3bd37b4c64f 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -277,6 +277,16 @@ return array( 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), ); \ No newline at end of file diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php index 7d36ed2d3d5f..d8818a66dee9 100644 --- a/app/lang/es/texts.php +++ b/app/lang/es/texts.php @@ -275,6 +275,17 @@ return array( 'expiration_month' => 'Expiration month', 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), ); diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php index 5813864148e1..2bb9a9a54a6e 100644 --- a/app/lang/fr/texts.php +++ b/app/lang/fr/texts.php @@ -276,6 +276,17 @@ return array( 'expiration_month' => 'Expiration month', 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), ); diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index fd7bdf8ae9bb..eb06f33f7036 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -276,6 +276,17 @@ return array( 'expiration_month' => 'Expiration month', 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), diff --git a/app/lang/pt_BR/texts.php b/app/lang/pt_BR/texts.php index 043166194585..957d40d66a39 100644 --- a/app/lang/pt_BR/texts.php +++ b/app/lang/pt_BR/texts.php @@ -276,5 +276,16 @@ return array( 'expiration_year' => 'Expiration year', 'cvv' => 'CVV', + // Security alerts + 'confide' => array( + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ), + ); diff --git a/app/views/emails/confirm_html.blade.php b/app/views/emails/confirm_html.blade.php index b9036f0ea4b6..23ccaa641dcb 100755 --- a/app/views/emails/confirm_html.blade.php +++ b/app/views/emails/confirm_html.blade.php @@ -1,9 +1,9 @@
{{ trans('texts.confirmation_message') }}
+{{ trans('texts.confirmation_message') }} {{{ URL::to("user/confirm/{$user->confirmation_code}") }}} - + {{ trans('texts.email_signature') }}