* 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.
|
||||
$num_rows = $this->db
|
||||
->select('*')
|
||||
->from('ea_users')
|
||||
->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner')
|
||||
->where('ea_roles.slug', DB_SLUG_CUSTOMER)
|
||||
->where('ea_users.email', $customer['email'])
|
||||
->get()
|
||||
->num_rows();
|
||||
|
||||
if ($num_rows > 0 && !isset($customer['id'])) {
|
||||
throw new Exception('Given email address belongs to another customer record. '
|
||||
. 'Please use a different email.');
|
||||
}
|
||||
//$num_rows = $this->db
|
||||
// ->select('*')
|
||||
// ->from('ea_users')
|
||||
// ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner')
|
||||
// ->where('ea_roles.slug', DB_SLUG_CUSTOMER)
|
||||
// ->where('ea_users.email', $customer['email'])
|
||||
// ->get()
|
||||
// ->num_rows();
|
||||
//
|
||||
//if ($num_rows > 0 && !isset($customer['id'])) {
|
||||
// throw new Exception('Given email address belongs to another customer record. '
|
||||
// . 'Please use a different email.');
|
||||
//}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue