Skip to content

User's Roles, Passwords and E Mails on Test Systems

phiesel edited this page Aug 11, 2014 · 3 revisions

Please review Test Emails locally to see how to test emails locally.


How to Change a User's Role in the DB

  1. First, lookup the user's id in the User_ table:

    SELECT * FROM User_ WHERE emailAddress LIKE "%[email protected]%";

    Remember the value of the userId column (in my case 1452568)

  2. Lookup the id of the new role the user should get in the Role_ table. In my case, 10118 for Administrator.

  3. Modify the user -> role mapping in the table Users_Roles, use the appropriate userId and roleId from above steps:

    UPDATE Users_Roles SET roleId = "10118" WHERE userId = "1452568" LIMIT 1;

Set passwords of all users to test1111

For testing purposes, it is often useful to have the same password for all users on the platform. Use the following query to set it to test1111 for everyone:

UPDATE User_ SET password_ = 'AAAAoAAB9AAcxVdARWqrmTE/qqDGXo+QYoBCKRH0dFC4atg4';

Change e-mail addresses for testing emails

This is an alternative to: Test Emails locally

It might also be useful to set the email addresses to your address to avoid sending mails to actual users:

UPDATE User_ SET emailAddress = CONCAT("m.l.thurner+u", userId, "@gmail.com");

This sets the email address to [email protected], where 10115 is the userId of the user. All emails will now be sent to [email protected], taking advantage of Gmail's + system.