How did the admin account on demo get its locale set to Spanish?

Hi All,

I was looking at [RA-660] - OpenMRS Issues and I discovered that the admin account on the demo server is set to have default locale of Spanish. Further, when I try to change this to English through the UI I get an error:

admin user account is locked

Does anybody know how this got changed?

The UI at http://demo.openmrs.org/openmrs/options.form is too confusing for me to try to troubleshoot effectively. I’m on the “Defaults” tab and try to change the local but when I submit/save, I get an “Incorrect password.” error on the “Change Login Info” tab.

Hi Michael,

I also find it hopelessly confusing. (Can’t wait for the new adminui page to replace this!)

But what I ran into was that you cannot change the default for the admin user through the UI (even if you put in all the passwords), and the underlying get the error (inside a stack trace or something) is “admin user account is locked”.

Are there any other ways this might have been changed? Does anyone remember changing it themself? :slight_smile:

Well, AFAIK we have locked certain aspects of the admin account in the DB to prevent lockouts … will try to reproduce the steps you got to above.

That message is most likely due to adding this to our db to prevent people from changing the admin password.

DELIMITER ;;
CREATE TRIGGER users_update BEFORE UPDATE ON users FOR EACH ROW
IF OLD.user_id = 1 THEN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'admin user account is locked';
END IF;;
CREATE TRIGGER users_delete BEFORE DELETE ON users FOR EACH ROW
IF OLD.user_id = 1 THEN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'admin user account is locked';
END IF;;
DELIMITER ;

Perhaps we need a few more to prevent further changes?

It would be nice if we could allow the locale to be changed per session but disallow the change of its per-user default.