Add users directly in SQL

Hi Pieter, that is a really interesting question.

If I recall correctly there are some length and complexity requirements for a username and password. The username and password might also need to be different. “Password does not meet minimum requirements and should contain at least each of the following items: A number, a lowercase letter, an uppercase letter, a special character (not a letter or number).”

When I use the add user prompt you need to be logged in as an admin and type your admin password. Maybe try setting the authorized value to 1 and see what happens? Also the calendar field you may want to set to 1 as well.

A good place to start might be to look into /openemr/interface/usergroup/usergroup_admin_add.php for clues.

It takes me to user_info_ajax.php. Which appears to call a function from $library/authentication/password_change.php"

Which led me to open file openemr/library/authentication/common_operations.php

So maybe try comparing the initializePassword function in it.

If you look at login_operations.php when login fails it generates several “newEvent” options. Can you check the logs?