1
iolai
mysql and creating new users
  • 2004/7/5 13:23

  • iolai

  • Quite a regular

  • Posts: 206

  • Since: 2004/6/26


I want to create a new user directly through mysql.
What fields do I have to insert, except user name and password?

In addition, I tried to remove password of a test user (using mysql), and reset the password to blank. This worked, however I couldn't log the user anymore. In other words, how to set the password for the user directly from mysql?

I used phpmyadmin to do all the needed operations.

2
chapi
Re: mysql and creating new users
  • 2004/7/5 13:58

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Why want you add a user through mysql?! You can add new users perfectly through the XOOPS administration! Login to your XOOPS site and go to

Administration > System Admin > Edit User

There you will also be seeing a form called "Add User".

The password has to be md5 encrypted! The best way to set a new password for a user is to use the Edit User screen again. There you can select a user for editing and change all his profile items including the password.

3
iolai
Re: mysql and creating new users
  • 2004/7/5 15:50

  • iolai

  • Quite a regular

  • Posts: 206

  • Since: 2004/6/26


The reason I want to add a user from out of the site is because... Damn, this would be a long explanation. I just need to create the user using some external application.

Basicly, the users will be logging to some shell, type a command, and that command will add the user to XOOPS DB.


4
Dave_L
Re: mysql and creating new users
  • 2004/7/5 16:26

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Use register.php or modules/system/admin/users/users.php as a guideline. That's where XOOPS inserts users into the database.

You could also look at a "freshly" inserted row in the users table, to see what values are placed in the columns.


In answer to your other question, here's an example of manually changing a user's password:

UPDATE xoops_users SET pass=MD5('newpassword'WHERE uid=1234

Login

Who's Online

406 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 406


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits