Used more dbm::is_result() instead of (!$r) or (!count($r)), still there are
more pending ... Also put SQL table columns into back-ticks. Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
		
					parent
					
						
							
								c43389f79a
							
						
					
				
			
			
				commit
				
					
						a96eb3428d
					
				
			
		
					 11 changed files with 20 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -241,7 +241,7 @@ function create_user($arr) {
 | 
			
		|||
		WHERE `nickname` = '%s' ",
 | 
			
		||||
		dbesc($nickname)
 | 
			
		||||
	);
 | 
			
		||||
	if((count($r) > 1) && $newuid) {
 | 
			
		||||
	if ((dbm::is_result($r)) && (count($r) > 1) && $newuid) {
 | 
			
		||||
		$result['message'] .= t('Nickname is already registered. Please choose another.') . EOL;
 | 
			
		||||
		q("DELETE FROM `user` WHERE `uid` = %d",
 | 
			
		||||
			intval($newuid)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue