mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'dev/anadir_ficheros_presu'
Main See merge request jjimenez/safekat!262
This commit is contained in:
@ -19,11 +19,27 @@ class UserModel extends ShieldUserModel
|
||||
];
|
||||
}
|
||||
|
||||
/*protected $validationRules = [
|
||||
"email" => [
|
||||
"label" => "RolesPermisos.email",
|
||||
"rules" => "required|max_length[150]",
|
||||
protected $validationRules = [
|
||||
"username" => [
|
||||
"label" => "correo duplicado",
|
||||
"rules" => "is_unique[users.username]",
|
||||
]
|
||||
|
||||
];*/
|
||||
];
|
||||
|
||||
public function getComerciales(){
|
||||
|
||||
$builder = $this->db
|
||||
->table("users" . " t1")
|
||||
->select(
|
||||
"t1.id AS id, CONCAT(t1.first_name, ' ', t1.last_name) AS text"
|
||||
);
|
||||
|
||||
$builder->where('t1.deleted_at', null);
|
||||
$builder->where("t2.group", "comercial");
|
||||
$builder->join("auth_groups_users t2", "t1.id = t2.user_id", "left");
|
||||
|
||||
return $builder->get()->getResult();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user