Title: codebanter's Replies | WordPress.org

---

# codebanter

  [  ](https://wordpress.org/support/users/codebanter/)

 *   [Profile](https://wordpress.org/support/users/codebanter/)
 *   [Topics Started](https://wordpress.org/support/users/codebanter/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codebanter/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codebanter/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codebanter/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codebanter/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codebanter/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [remove_role not working](https://wordpress.org/support/topic/remove_role-not-working/)
 *  Thread Starter [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/remove_role-not-working/#post-1359185)
 * Solved this problem later on that same day, so decided to come back in here and
   post what I found out.
 * I’ll keep this brief since I have a page on my site that explains everything 
   in greater detail. I’ll link to the page at the end of this post.
 * Basically, inside the remove_user method contained in the WP_User class, there
   is an error. The code is checking for the existence of the specified role using
 * `empty($this->roles[$role])`
 * The problem is that $this->roles returns an index array with the roles as values.
   The code above would require a multidimensional array with the role names as 
   the keys, not the values.
 * To solve this, I created a plugin which is just a custom class that extends the
   WP_User Class and overrides the remove_role method. My new method does an in_array
   check for the existence of the role. All of the existing WP_User functionality
   remains intact, therefore you can use this new class in it’s place.
 * You can see the rest of the details and download the plugin [ here at my site ](http://codebanter.com/wp_stuff/).
 * Craig
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [remove_role not working](https://wordpress.org/support/topic/remove_role-not-working/)
 *  Thread Starter [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/remove_role-not-working/#post-1358951)
 * Has anyone else had this problem?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Problems with plugin](https://wordpress.org/support/topic/problems-with-plugin/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/problems-with-plugin/#post-1358331)
 * If installing that one plugin was the only change you made before the page went
   white, then deleting it should have corrected the problem. I’ve done this before
   to solve a similar problem.
 * Sorry I can’t be more help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Problems with plugin](https://wordpress.org/support/topic/problems-with-plugin/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/problems-with-plugin/#post-1358326)
 * If you install a plugin that screws everything up and won’t let you load admin,
   simply login to your ftp server and delete the plugin. Your site will load as
   it did before you installed the problematic plugin and you will again be able
   to access your admin.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to insert opt in box in sidebar](https://wordpress.org/support/topic/how-to-insert-opt-in-box-in-sidebar/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/how-to-insert-opt-in-box-in-sidebar/#post-652835)
 * Codebanter.com has a plugin that helps you to add a Get Response or Aweber Optin
   box to your sidebar easily.
    [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Find the html source](https://wordpress.org/support/topic/find-the-html-source/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/find-the-html-source/#post-612517)
 * **Codebanter.com** has a plugin that helps you to add a Get Response or Aweber
   Optin box to your sidebar easily.
 * [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Join Email List Form in Sidebar?](https://wordpress.org/support/topic/join-email-list-form-in-sidebar/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/join-email-list-form-in-sidebar/page/2/#post-547494)
 * **Codebanter.com** has a plugin that helps you to add a Get Response or Aweber
   Optin box to your sidebar easily.
    [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to add a Aweber Subscription Form](https://wordpress.org/support/topic/how-to-add-a-aweber-subscription-form/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/how-to-add-a-aweber-subscription-form/#post-556591)
 * **Codebanter.com** has a plugin that helps you to add a Get Response or Aweber
   Optin box to your sidebar easily.
 * [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Advanced: Aweber & WP Integration](https://wordpress.org/support/topic/advanced-aweber-038-wp-integration/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/advanced-aweber-038-wp-integration/#post-614864)
 * **Codebanter.com** has a plugin that helps you to add a Get Response or Aweber
   Optin box to your sidebar easily.
 * [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adding an Optin Box to my sidebar](https://wordpress.org/support/topic/adding-an-optin-box-to-my-sidebar/)
 *  [codebanter](https://wordpress.org/support/users/codebanter/)
 * (@codebanter)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/adding-an-optin-box-to-my-sidebar/#post-524296)
 * **Codebanter.com** has a plugin that helps you to add a Get Response or Aweber
   Optin box to your sidebar easily.
 * [http://www.codebanter.com/projects/](http://www.codebanter.com/projects/)

Viewing 10 replies - 1 through 10 (of 10 total)