AnsweredAssumed Answered

How to prevent user from entering previous 10 passwords in a new password field using ajax?

Question asked by Sohan Tirpude on Dec 2, 2014
Latest reply on Mar 26, 2015 by Sohan Tirpude
I am using SugarCRM 6.5.X CE version, I want to add some JavaScript validations in existing JavaScript validations when user changes his password.

Now, I want to use AJAX to connect with PHP file which runs db query
against the current user and check whether the entered password in
new_password field is matches with his last 10 passwords.

Now, I
  found out those function which SugarCRM uses to match passwords with
the hashed passwords stored in database. But, the problem is I don't
know how to use AJAX to connect to PHP file in SugarCRM.

I want
to add JavaScript validation using onblur function. When user enter his
new password, using onblur, I want to send that password value to PHP
file using AJAX and return that value. And when user click save button,
it should give alert box if his new password matches with his last
passwords and if not it should allow him to change his password.

Can anyone here guide me soon? Any help is appreciated.

Outcomes