improved browser language detect, set user language on login
This commit is contained in:
		
					parent
					
						
							
								3ea145fae7
							
						
					
				
			
			
				commit
				
					
						3e6180183b
					
				
			
		
					 5 changed files with 65 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -103,11 +103,15 @@ function openid_content(&$a) {
 | 
			
		|||
				$_SESSION['cid'] = $a->cid;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
 | 
			
		||||
			$l = get_language();
 | 
			
		||||
 | 
			
		||||
			q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1",
 | 
			
		||||
				dbesc(datetime_convert()),
 | 
			
		||||
				dbesc($l),
 | 
			
		||||
				intval($_SESSION['uid'])
 | 
			
		||||
			);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
 | 
			
		||||
			if(($a->module !== 'home') && isset($_SESSION['return_url']))
 | 
			
		||||
				goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue