protected function beforeDelete() {

		// deletes user sessions
		$this->db->exec('DELETE FROM `sessions` WHERE id_user = ?', $this->id);
	
		// deletes error_logs of this user
		$this->db->exec('DELETE FROM `error_logs` WHERE user_id = ?', $this->id);
		
	}
protected function beforeDelete() {

		// deletes user sessions
		$this->db->exec('DELETE FROM `sessions` WHERE id_user = ?', $this->id);
	
		// deletes error_logs of this user
		$this->db->exec('DELETE FROM `error_logs` WHERE user_id = ?', $this->id);
		
	}
protected function beforeDelete ( ) { // deletes user sessions $ this -> db -> exec ( 'DELETE FROM `sessions` WHERE id_user = ?' , $ this -> id ) ; // deletes error_logs of this user $ this -> db -> exec ( 'DELETE FROM `error_logs` WHERE user_id = ?' , $ this -> id ) ; }
Deletes sessions of an user before its deletion.
Deletes sessions of an user before its deletion .