I want to save a user's email and username when a button is clicked. I assume I have to do this via PHP but I can find the user column at localhost/phpmyadmin. Where is the users' information being stored and which is the MySQL query to achieve that?


1 Answer 1


You should not use a direct MySQL query to update anything.

In this case you can use user_save(); which it is basically, load the user object -> change data -> pass it to user_save(); or even better user entityAPI and entity_metadata_wrappers

The default table where drupal saves user data is users, there you can find the email and username

Not the answer you're looking for? Browse other questions tagged or ask your own question.