diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 971ebc449..7692962c2 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -183,9 +183,11 @@ class AuthController extends Controller $message12 = ''; $settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first(); $sms = Plugin::select('status')->where('name', '=', 'SMS')->first(); - // Event for login - \Event::fire(new \App\Events\LoginEvent($request)); - $var = $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]); + // Event for login + \Event::fire(new \App\Events\LoginEvent($request)); + if ($request->input('email') !== '') { + $var = $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]); + } if ($settings->status == 1 || $settings->status == '1') { if (count($sms) > 0) { if ($sms->status == 1 || $sms->status == '1') { @@ -194,7 +196,11 @@ class AuthController extends Controller $message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_sms_plugin_inactive_or_not_setup'); } } else { - $message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'); + if ($request->input('email') !== '') { + $message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'); + } else { + $message12 = Lang::get('lang.account-created-contact-admin-as-we-were-not-able-to-send-opt'); + } } } else { $message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail'); diff --git a/resources/lang/de/lang.php b/resources/lang/de/lang.php index e2d90f32e..751d75ae6 100644 --- a/resources/lang/de/lang.php +++ b/resources/lang/de/lang.php @@ -1146,4 +1146,7 @@ return [ 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', + ]; diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index d96b13e49..4eb8f0b87 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -1583,4 +1583,7 @@ return [ 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', + ]; diff --git a/resources/lang/fr/lang.php b/resources/lang/fr/lang.php index 2df9999b9..dfe4b5106 100644 --- a/resources/lang/fr/lang.php +++ b/resources/lang/fr/lang.php @@ -1554,4 +1554,7 @@ return [ 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', + ]; diff --git a/resources/lang/it/lang.php b/resources/lang/it/lang.php index 40bb8faaf..b629f2bd1 100644 --- a/resources/lang/it/lang.php +++ b/resources/lang/it/lang.php @@ -1105,4 +1105,7 @@ return [ 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', ]; diff --git a/resources/lang/nl/lang.php b/resources/lang/nl/lang.php index 34c6e13ce..8bb0b35c7 100644 --- a/resources/lang/nl/lang.php +++ b/resources/lang/nl/lang.php @@ -1599,4 +1599,7 @@ return [ 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', + ]; diff --git a/resources/lang/pt/lang.php b/resources/lang/pt/lang.php index fed5c3db7..116d1ec49 100644 --- a/resources/lang/pt/lang.php +++ b/resources/lang/pt/lang.php @@ -1544,4 +1544,7 @@ return [ 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', + ]; diff --git a/resources/lang/ru/lang.php b/resources/lang/ru/lang.php index df3ffe5c0..3bf31ee42 100644 --- a/resources/lang/ru/lang.php +++ b/resources/lang/ru/lang.php @@ -1052,4 +1052,7 @@ return [ 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', + + //update 18-12-2016 + 'account-created-contact-admin-as-we-were-not-able-to-send-opt' => 'Your account has been created successfully. Please contact admin for account activation as we were not able to send you an OPT code.', ];