I am using evo 1.0.10 and the need is to create new users using the API (only username and password, no e-mail needed).
For the login process I use the WebloginPe.
I have tried to insert records into modx_web_users, but it does not seem to be enough for logging in.
Searching the internet for better solutions I found the call
$modx->newObject('modUser');
but evo does not seem to recognize it?
Since I am quite new to modx could someone point me to the right direction?
Thank you in advance
-
☆ A M B ☆
- 24,524 Posts
Evo handles this quite differently from Revo; the method you mention is for Revo.
As far as I recall, to create users in Evo you just directly access the database to insert first into the web_users table, get the new user ID and use it as the internalKey value for the web_user_settings table and the user_groups table. You will need an email to get the created users to display properly in the Manager, though. The email doesn't need to be a real one, you can use a common dummy email. Be careful to test for duplicate usernames in your code.
Thank you very much for your prompt reply.
I will do as you suggest, if I have any difficulties I will post them in this thread.
Inserting into web_users, web_user_attributes and user_groups worked perfectly.