mokiSRB
mokiSRB

Reputation: 1162

Joomla user registration insert file

I am looking for file in joomla 3, where is the query that inputs into db values from registration fields?

Thanks in advance.

Upvotes: 0

Views: 95

Answers (1)

Craig
Craig

Reputation: 9330

If you follow the code from com_users you will see that it loads and uses the Model UsersModelUser (loaded from /administrator/models/user.php ) which in turn uses the class JUser (loaded from /libraries/joomla/user/user.php ).

If you want to create/alter users, you should load and instance of UsersModelUser and use it's load() to load an existing user and it's save() method to store any change or to create new user entries.

By using the UsersModelUser and therefore JUser you will get all of the niceties like two-factor authentication (if it's configured) and the correct hash for the password based on the authentication system/plugins in use. It will even generate a random password if you don't pass one in the with data used to create a new user.

Upvotes: 2

Related Questions