mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-01 04:12:22 +03:00
Correct the validate username method
This commit is contained in:
parent
bc0de8ec53
commit
30c55a4666
3 changed files with 21 additions and 3 deletions
|
@ -178,7 +178,13 @@ class Admins_model extends EA_Model {
|
||||||
$this->db->where('id_users !=', $admin_id);
|
$this->db->where('id_users !=', $admin_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->db->get_where('user_settings', ['username' => $username, 'delete_datetime' => NULL])->num_rows() === 0;
|
return $this
|
||||||
|
->db
|
||||||
|
->from('users')
|
||||||
|
->join('user_settings', 'user_settings.id_users = users.id', 'inner')
|
||||||
|
->where(['username' => $username, 'delete_datetime' => NULL])
|
||||||
|
->get()
|
||||||
|
->num_rows() === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -193,7 +193,13 @@ class Providers_model extends EA_Model {
|
||||||
$this->db->where('id_users !=', $provider_id);
|
$this->db->where('id_users !=', $provider_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->db->get_where('user_settings', ['username' => $username, 'delete_datetime' => NULL])->num_rows() === 0;
|
return $this
|
||||||
|
->db
|
||||||
|
->from('users')
|
||||||
|
->join('user_settings', 'user_settings.id_users = users.id', 'inner')
|
||||||
|
->where(['username' => $username, 'delete_datetime' => NULL])
|
||||||
|
->get()
|
||||||
|
->num_rows() === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -191,7 +191,13 @@ class Secretaries_model extends EA_Model {
|
||||||
$this->db->where('id_users !=', $secretary_id);
|
$this->db->where('id_users !=', $secretary_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->db->get_where('user_settings', ['username' => $username, 'delete_datetime' => NULL])->num_rows() === 0;
|
return $this
|
||||||
|
->db
|
||||||
|
->from('users')
|
||||||
|
->join('user_settings', 'user_settings.id_users = users.id', 'inner')
|
||||||
|
->where(['username' => $username, 'delete_datetime' => NULL])
|
||||||
|
->get()
|
||||||
|
->num_rows() === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue