Open herbdool opened 4 years ago
I'm certain there's a better PHP function to call (e.g. firing any needful hooks) -- but just as a reference point, for civicrm infra/ops#906, we used this SQL as quick-n-dirty work-around:
INSERT IGNORE INTO users_roles (uid,role)
SELECT uid, "the_role_name"
FROM users
WHERE name = "the_user_name";
(Adapted from backdrop-demo/install.sh @ 8b2067f)
Duplicate functionality of https://drushcommands.com/drush-8x/user/user-add-role/, adding roles to specified user accounts.