forked from Public/pics
		
	Member: set empty reset key for new users
This commit is contained in:
		
							parent
							
								
									4b26c677bb
								
							
						
					
					
						commit
						219260c57f
					
				@ -77,6 +77,7 @@ class Member extends User
 | 
				
			|||||||
			'creation_time' => time(),
 | 
								'creation_time' => time(),
 | 
				
			||||||
			'ip_address' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '',
 | 
								'ip_address' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '',
 | 
				
			||||||
			'is_admin' => empty($data['is_admin']) ? 0 : 1,
 | 
								'is_admin' => empty($data['is_admin']) ? 0 : 1,
 | 
				
			||||||
 | 
								'reset_key' => '',
 | 
				
			||||||
		];
 | 
							];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ($error)
 | 
							if ($error)
 | 
				
			||||||
@ -92,6 +93,7 @@ class Member extends User
 | 
				
			|||||||
			'creation_time' => 'int',
 | 
								'creation_time' => 'int',
 | 
				
			||||||
			'ip_address' => 'string-45',
 | 
								'ip_address' => 'string-45',
 | 
				
			||||||
			'is_admin' => 'int',
 | 
								'is_admin' => 'int',
 | 
				
			||||||
 | 
								'reset_key' => 'string-16'
 | 
				
			||||||
		], $new_user, ['id_user']);
 | 
							], $new_user, ['id_user']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!$bool)
 | 
							if (!$bool)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user