Title: remove_role() then add_role() &#8211; quick php script needed.
Last modified: August 20, 2016

---

# remove_role() then add_role() – quick php script needed.

 *  [PAFoster](https://wordpress.org/support/users/pafoster/)
 * (@pafoster)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/remove_role-then-add_role-quick-php-script-needed/)
 * I need to send a wp User ID to a php script that uses the wp functions remove_role()
   and add_role() to change the role of the user before using a php header rediect
   to another site.
 * Probably only a few lines of lines of code, but have no idea what to do. Any 
   help appreciated.

The topic ‘remove_role() then add_role() – quick php script needed.’ is closed to
new replies.

## Tags

 * [add role](https://wordpress.org/support/topic-tag/add-role/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [remove_role](https://wordpress.org/support/topic-tag/remove_role/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 0 replies
 * 1 participant
 * Last reply from: [PAFoster](https://wordpress.org/support/users/pafoster/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/remove_role-then-add_role-quick-php-script-needed/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
