diff --git a/ci4/app/Entities/Usuarios/UserEntity.php b/ci4/app/Entities/Usuarios/UserEntity.php index a6410e2f..ecfca4f4 100755 --- a/ci4/app/Entities/Usuarios/UserEntity.php +++ b/ci4/app/Entities/Usuarios/UserEntity.php @@ -1,11 +1,9 @@ null, @@ -20,7 +18,6 @@ class UserEntity extends \CodeIgniter\Entity\Entity "created_at" => null, "updated_at" => null, "deleted_at" => null, - ]; protected $casts = [ "id" => "int", @@ -73,4 +70,6 @@ class UserEntity extends \CodeIgniter\Entity\Entity $m = model(ChatNotification::class); return $m->where('user_id',$this->attributes['id'])->findAll() ?? []; } + + } diff --git a/ci4/app/Entities/Usuarios/UsersEntity.php b/ci4/app/Entities/Usuarios/UsersEntity.php deleted file mode 100644 index 51da0555..00000000 --- a/ci4/app/Entities/Usuarios/UsersEntity.php +++ /dev/null @@ -1,30 +0,0 @@ - null, - 'last_name'=> null, - 'cliente_id' => null, - 'comments' => null, - ]; - protected $casts = [ - "cliente_id" => "int", - ]; - - public function getFullName() - { - $firstName = trim($this->attributes["first_name"] ?? ""); - $lastName = trim($this->attributes["last_name"] ?? ""); - $fullName = $firstName . ' ' . $lastName; - $fullName = trim($fullName); // In case first name is empty, this will remove the leading space - - // Use the username attribute if the full name is still empty after trimming - return $fullName ?: $this->attributes["username"]; - } - - -}