-
Notifications
You must be signed in to change notification settings - Fork 34
Manually Adding A User
Armand Duijn edited this page Dec 8, 2017
·
2 revisions
Step 1. Add to Member
table
First, we need to add the person to the Member
table. In this example, we'll assume that the person is called Frans.
INSERT INTO Member (lidnr, generation, firstName, type, changedOn, expiration, paid) VALUES (1337, 2017, "Frans", "ordinary", "1970-01-01", "1970-01-01", 1);
Step 2. Add to User
table
In this step, we need to set a password for new member. The password needs to be hashed with bcrypt. Refer to the global configuration file to discover the amount of rounds you need to perform. As of writing, 13 rounds of brcypt are required.
The hashed password below corresponds to the string 7plaid-1best-Toot-Mound-Hit3
.
INSERT INTO User (lidnr, password) VALUES (1337, "$2a$13$GxavPCwWFqtZC.MHOGlLd.cGWfpiYi1H0GARhHO/iNc8H7LEqrd/.");
Step 3. Add to UserRole
table
Finally, we can assign a role to the user.
INSERT INTO UserRole (lidnr_id, role) VALUES (1337, "photo_guest");
- Contributing
- Architecture
- Components
- View helpers
- Sub-projects
- Archive