diff --git a/ci4/app/Controllers/Integration.php b/ci4/app/Controllers/Integration.php index 05a84d56..fc72033b 100644 --- a/ci4/app/Controllers/Integration.php +++ b/ci4/app/Controllers/Integration.php @@ -50,9 +50,12 @@ class Integration extends BaseController if(!empty($user)){ foreach (keywordEmail()??[] as $item){ $field = str_replace(['[','user_',']'],'',$item); - $body = str_replace('['.$item.']',$user[$field],$body); + if(str_contains($body, $field)){ + $body = str_replace('['.$item.']',$user->{$field},$body); + } } } + if($this->sendMail($subject,unescape($body),$email)){ return $json ? json_encode(["return" => true]) : true; }else{ diff --git a/ci4/app/Controllers/Login.php b/ci4/app/Controllers/Login.php index a63e7a94..559e370c 100644 --- a/ci4/app/Controllers/Login.php +++ b/ci4/app/Controllers/Login.php @@ -365,7 +365,7 @@ class login extends BaseController $rules = [ 'first_name' => 'required', 'last_name' => 'required', - 'email' => 'required|valid_email|is_unique[user.email]', + 'email' => 'required|valid_email|is_unique[auth_user.email]', 'password' => 'required|min_length[8]' ]; $rules_error = [ @@ -385,9 +385,10 @@ class login extends BaseController 'min_length' => lang("App.login_rules_password_m") ] ]; - + if ($this->validate($rules,$rules_error)){ if($listPost = $this->request->getPost()) { + if($settings['captcha_register']??false){ if($settings['captcha_gateway'] == 'recaptcha'){ if(isset($listPost['g-recaptcha-response'])){ @@ -426,8 +427,8 @@ class login extends BaseController } $phpass = new PasswordHash(8, true); $userToken = md5(uniqid(rand(), true)); - $this->user_model->save([ - 'group' => $settings['default_role'], + $this->user_model->skipValidation(true)->save([ + //'group' => $settings['default_role'], 'first_name' => $listPost['first_name'], 'last_name' => $listPost['last_name'], 'mobile' => '', @@ -438,7 +439,12 @@ class login extends BaseController 'last_ip' => '::1', 'language' => $settings['default_language'], 'token' => $userToken, - 'status' => true + 'status' => 1, + 'address' => '', + 'city' => '', + 'state' => '', + 'country' => '', + 'zip_code' => '', ]); //Get Data Template $templates = $this->template_model->findAll(); @@ -450,6 +456,7 @@ class login extends BaseController try { $this->integration->send_email($listPost['email'],$template['subject'],$template['body'],$phpass->HashPassword(MD5($listPost['email']))); }catch (\Exception $e){ + } } } diff --git a/ci4/app/Entities/Configuracion/Maquina.php b/ci4/app/Entities/Configuracion/Maquina.php index 2a4953dc..c88ba673 100644 --- a/ci4/app/Entities/Configuracion/Maquina.php +++ b/ci4/app/Entities/Configuracion/Maquina.php @@ -11,8 +11,8 @@ class Maquina extends \CodeIgniter\Entity\Entity "is_padre" => false, "tipo" => null, "velocidad" => 0.0, - "ancho" => null, - "alto" => null, + "ancho" => 100.0, + "alto" => 100.0, "ancho_impresion" => 0.0, "alto_impresion" => 0.0, "alto_click" => 0.0, @@ -27,10 +27,10 @@ class Maquina extends \CodeIgniter\Entity\Entity "precio_tinta_color" => 0.0, "velocidad_corte" => 0.0, "precio_hora_corte" => 0.0, - "metrosxminuto" => null, + "metrosxminuto" => 0.0, "forzar_num_formas_horizontales_portada" => null, "forzar_num_formas_verticales_portada" => null, - "observaciones" => null, + "observaciones" => "", "is_deleted" => 0, "created_at" => null, "updated_at" => null, diff --git a/ci4/app/Entities/Usuarios/UserEntity.php b/ci4/app/Entities/Usuarios/UserEntity.php index e4128f0a..33d26f31 100644 --- a/ci4/app/Entities/Usuarios/UserEntity.php +++ b/ci4/app/Entities/Usuarios/UserEntity.php @@ -7,15 +7,14 @@ class UserEntity extends \CodeIgniter\Entity\Entity { protected $attributes = [ "id_user" => null, - "group" => null, "first_name" => null, "last_name" => null, "date_birth" => null, - "address" => null, - "city" => null, - "state" => null, - "country" => null, - "zip_code" => null, + "address" => "", + "city" => "", + "state" => "", + "country" => "", + "zip_code" => "", "mobile" => null, "email" => null, "password" => null, @@ -24,8 +23,8 @@ class UserEntity extends \CodeIgniter\Entity\Entity "picture" => "/assets/img/default-user.png", "language" => null, "tfa" => false, - "tfa_secret" => null, - "tfa_code" => null, + "tfa_secret" => "", + "tfa_code" => "", "blocked" => null, "email_confirmed" => 0, "token" => null, diff --git a/ci4/app/Models/Configuracion/MaquinaModel.php b/ci4/app/Models/Configuracion/MaquinaModel.php index 78540f6e..35ada300 100644 --- a/ci4/app/Models/Configuracion/MaquinaModel.php +++ b/ci4/app/Models/Configuracion/MaquinaModel.php @@ -199,7 +199,7 @@ class MaquinaModel extends \App\Models\GoBaseModel ], "observaciones" => [ "max_length" => "Maquinas.validation.observaciones.max_length", - "required" => "Maquinas.validation.observaciones.required", + //"required" => "Maquinas.validation.observaciones.required", ], "orden_planning" => [ "integer" => "Maquinas.validation.orden_planning.integer", diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/_maquinaFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/_maquinaFormItems.php index 62e8bedd..bbc0c994 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/_maquinaFormItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/_maquinaFormItems.php @@ -1,223 +1,299 @@ -
Datos de la Máquina
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+
+
+ +
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+
+
+ + +
+
+ +
+
+ + +
+
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+
+
+ + +
+
-
-
- is_padre == true ? 'checked' : ''; ?> - > - -
-
- -
-
- is_rotativa == true ? 'checked' : ''; ?> - > - -
-
+
+
+ + +
+
-
-
- is_tinta == true ? 'checked' : ''; ?> - > - -
-
+
+
+ + +
+
- is_rotativa == false): ?> - \ No newline at end of file + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ + +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ + is_rotativa== false): ?> + + +
\ No newline at end of file diff --git a/ci4/app/Views/themes/backend/vuexy/form/login/signup.php b/ci4/app/Views/themes/backend/vuexy/form/login/signup.php index 0eec9e81..a560099f 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/login/signup.php +++ b/ci4/app/Views/themes/backend/vuexy/form/login/signup.php @@ -43,13 +43,24 @@
" method="POST">
- + + autofocus + /> +
+
+ + autofocus />