From 6c4c66e368ee1fd717b82f3f1a343cad04de2079 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Fri, 18 Dec 2020 07:44:30 -0400 Subject: [PATCH] PMCORE-2568 It is possible to attempt to create a user with no user name --- .../src/components/personalInformation.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/workflow/engine/methods/userPersonalInformation/src/components/personalInformation.vue b/workflow/engine/methods/userPersonalInformation/src/components/personalInformation.vue index a4c9b9ad9..e4e422abd 100644 --- a/workflow/engine/methods/userPersonalInformation/src/components/personalInformation.vue +++ b/workflow/engine/methods/userPersonalInformation/src/components/personalInformation.vue @@ -409,20 +409,26 @@ if (this.$v.form.$anyError) { return; } - if (this.form.USR_UID === "") { - if (this.form.USR_NEW_PASS === "") { + if (this.form.USR_UID.trim() === "") { + if (this.form.USR_USERNAME.trim() === "") { + this.validate.USR_USERNAME.message = this.$root.translation('ID_IS_REQUIRED'); + this.validate.USR_USERNAME.state = false; + this.disableButtonSave = true; + return; + } + if (this.form.USR_NEW_PASS.trim() === "") { this.validate.USR_NEW_PASS.message = this.$root.translation('ID_IS_REQUIRED'); this.validate.USR_NEW_PASS.state = false; this.disableButtonSave = true; return; } - if (this.form.USR_CNF_PASS === "") { + if (this.form.USR_CNF_PASS.trim() === "") { this.validate.USR_CNF_PASS.message = this.$root.translation('ID_IS_REQUIRED'); this.validate.USR_CNF_PASS.state = false; this.disableButtonSave = true; return; } - if (this.form.USR_CNF_PASS !== this.form.USR_NEW_PASS) { + if (this.form.USR_CNF_PASS.trim() !== this.form.USR_NEW_PASS.trim()) { this.validate.USR_CNF_PASS.message = this.$root.translation("ID_NEW_PASS_SAME_OLD_PASS"); this.validate.USR_CNF_PASS.state = false; this.disableButtonSave = true;