mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
* Updated customers_model.php (will not check for existing email).
This commit is contained in:
parent
57a3e433eb
commit
8ccbc0a89e
1 changed files with 13 additions and 13 deletions
|
@ -182,19 +182,19 @@ class Customers_Model extends CI_Model {
|
||||||
}
|
}
|
||||||
|
|
||||||
// When inserting a record the email address must be unique.
|
// When inserting a record the email address must be unique.
|
||||||
$num_rows = $this->db
|
//$num_rows = $this->db
|
||||||
->select('*')
|
// ->select('*')
|
||||||
->from('ea_users')
|
// ->from('ea_users')
|
||||||
->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner')
|
// ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner')
|
||||||
->where('ea_roles.slug', DB_SLUG_CUSTOMER)
|
// ->where('ea_roles.slug', DB_SLUG_CUSTOMER)
|
||||||
->where('ea_users.email', $customer['email'])
|
// ->where('ea_users.email', $customer['email'])
|
||||||
->get()
|
// ->get()
|
||||||
->num_rows();
|
// ->num_rows();
|
||||||
|
//
|
||||||
if ($num_rows > 0 && !isset($customer['id'])) {
|
//if ($num_rows > 0 && !isset($customer['id'])) {
|
||||||
throw new Exception('Given email address belongs to another customer record. '
|
// throw new Exception('Given email address belongs to another customer record. '
|
||||||
. 'Please use a different email.');
|
// . 'Please use a different email.');
|
||||||
}
|
//}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue