* Updated customers_model.php (will not check for existing email).

This commit is contained in:
alextselegidis@gmail.com 2013-11-24 16:19:12 +00:00
parent 57a3e433eb
commit 8ccbc0a89e

View file

@ -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;
} }