mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 03:17:32 -04:00 
			
		
		
		
	If non-english show message to change to english
This commit is contained in:
		
							parent
							
								
									c9719b282b
								
							
						
					
					
						commit
						63b43b199f
					
				| @ -105,6 +105,7 @@ class AccountController extends BaseController | |||||||
|     public function getStarted() |     public function getStarted() | ||||||
|     { |     { | ||||||
|         $user = false; |         $user = false; | ||||||
|  |         $account = false; | ||||||
|         $guestKey = Input::get('guest_key'); // local storage key to login until registered
 |         $guestKey = Input::get('guest_key'); // local storage key to login until registered
 | ||||||
| 
 | 
 | ||||||
|         if (Auth::check()) { |         if (Auth::check()) { | ||||||
| @ -131,6 +132,12 @@ class AccountController extends BaseController | |||||||
|         Auth::login($user, true); |         Auth::login($user, true); | ||||||
|         event(new UserSignedUp()); |         event(new UserSignedUp()); | ||||||
| 
 | 
 | ||||||
|  |         if ($account && $account->language_id != DEFAULT_LANGUAGE) { | ||||||
|  |             $link = link_to('/invoices/create?lang=en', 'click here'); | ||||||
|  |             $message = sprintf('Your account language has been set automatically, %s to change to English', $link); | ||||||
|  |             Session::flash('warning', $message); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         $redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'invoices/create'; |         $redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'invoices/create'; | ||||||
|         return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up')); |         return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up')); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user