mirror of
				https://bitbucket.org/jsuto/piler.git
				synced 2025-11-01 00:32:27 +01:00 
			
		
		
		
	| @@ -349,7 +349,7 @@ class ModelUserAuth extends Model { | ||||
|  | ||||
|       $uid = $this->model_user_user->get_uid_by_email($email); | ||||
|       if($uid < 1) { | ||||
|          $uid = $this->model_user_user->get_next_uid(TABLE_EMAIL); | ||||
|          $uid = $this->model_user_user->get_next_uid(); | ||||
|          $query = $this->db->query("INSERT INTO " . TABLE_EMAIL . " (uid, email) VALUES(?,?)", array($uid, $email)); | ||||
|       } | ||||
|  | ||||
|   | ||||
| @@ -306,9 +306,9 @@ class ModelUserUser extends Model { | ||||
|    } | ||||
|  | ||||
|  | ||||
|    public function get_next_uid($table = TABLE_USER) { | ||||
|    public function get_next_uid() { | ||||
|  | ||||
|       $query = $this->db->query("SELECT MAX(uid) AS last_id FROM " . $table); | ||||
|       $query = $this->db->query("SELECT MAX(uid) AS last_id FROM " . TABLE_EMAIL); | ||||
|  | ||||
|       if(isset($query->row['last_id']) && $query->row['last_id'] > 0) { | ||||
|          return (int)$query->row['last_id'] + 1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user