Corrected typo on get customer role ID method

This commit is contained in:
Alex Tselegidis 2021-10-28 13:26:19 +02:00
parent 0aaff2eae1
commit 4671055a52

View file

@ -255,11 +255,11 @@ class Customers_model extends EA_Model {
*/ */
public function get_customer_role_id(): int public function get_customer_role_id(): int
{ {
$role = $this->db->get_where('roles', ['slug' => DB_SLUG_ADMIN])->row_array(); $role = $this->db->get_where('roles', ['slug' => DB_SLUG_CUSTOMER])->row_array();
if (empty($role)) if (empty($role))
{ {
throw new RuntimeException('The admin role was not found in the database.'); throw new RuntimeException('The customer role was not found in the database.');
} }
return $role['id']; return $role['id'];