Post by kec » Tue Mar 27, 2018 8:24 pm

Hi,
I read this topic several times before elsewhere on the forum but none of the 'solutions' actually work.

The problem is that our client can't edit information from customers in the Admin. Since the password is dotted and the confirm-password field is empty but both mandatory you can't change the info.

'Solutions' like keep both fields empty don't work since the fields are mandatory.
Using another browser doesn't work either.

So in short: how solve this.

Standard OC: 2.3.0.2

Kind regards,

Kec
Last edited by kec on Tue Mar 27, 2018 8:46 pm, edited 1 time in total.

kec
New member

Posts

Joined
Sat Apr 20, 2013 6:06 pm

Post by straightlight » Tue Mar 27, 2018 8:30 pm

See this post: viewtopic.php?f=190&t=203076&p=718175#p718175 . This information is correct. According to the validation form of the admin customer page, the password is only mandatory when the password and confirmation have been filled. If they are both being left empty, those fields should not appear as being mandatory.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kec » Tue Mar 27, 2018 8:43 pm

Thank you for your respons. But no, that's not working over here.

When I empty the fields and save I get the message that the both password fields are have to be filled in.

UPDATE: You are right: there was another field on another tab that was empty! Deleting the passwords itself does work.
Thank you for refreshing my memory.

kec
New member

Posts

Joined
Sat Apr 20, 2013 6:06 pm

Post by straightlight » Tue Mar 27, 2018 8:47 pm

There seem to have some changes in the password validation field in the latest OC release. Very well. In the admin/controller/customer/customer.php file, in the public function validateForm() method, find:

Code: Select all

if ($this->request->post['password'] || (!isset($this->request->get['customer_id']))) {
			if ((utf8_strlen($this->request->post['password']) < 4) || (utf8_strlen($this->request->post['password']) > 20)) {
				$this->error['password'] = $this->language->get('error_password');
			}

			if ($this->request->post['password'] != $this->request->post['confirm']) {
				$this->error['confirm'] = $this->language->get('error_confirm');
			}
		}
replace with:

Code: Select all

if ($this->request->post['password'] || (!isset($this->request->get['customer_id']))) {
			if ((utf8_strlen(html_entity_decode($this->request->post['password'], ENT_QUOTES, 'UTF-8')) < 4) || (utf8_strlen(html_entity_decode($this->request->post['password'], ENT_QUOTES, 'UTF-8')) > 40)) {
				$this->error['password'] = $this->language->get('error_password');
			}

			if ($this->request->post['password'] != $this->request->post['confirm']) {
				$this->error['confirm'] = $this->language->get('error_confirm');
			}
		}
Clear your system/cache folder (excluding index.html file). This should resolved the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: fatelvis and 13 guests