Role::removePermission() method

Remove the given permission string, id or object.

This is the same as $role->permissions->remove($permission) except this one will accept ID or name.

Usage

$bool = $role->removePermission($permission);

Arguments

NameType(s)Description
permissionstring, int, Permission

Permission object, name or id.

Return value

bool

false if permission not recognized, true otherwise


Role methods and properties

API reference based on ProcessWire core version 3.0.137

Twitter updates

  • This week’s dev branch version brings you improvements to ProcessWire’s input->cookie API variable, plus it adds the ability to modify system URLs and paths at runtime. This post also includes some examples to demonstrate just how useful this can be— More
    20 September 2019
  • New post: This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— More
    6 September 2019
  • We added WebP image support this year and many have been adopting it in existing projects. We look at a process used for migrating existing websites to WebP images— from preliminary considerations to implementation & testing, w/lots of tips & tricks too: More
    16 August 2019

Latest news

  • ProcessWire Weekly #280
    In the 280th issue of ProcessWire Weekly we're going to cover the new core features introduced by ProcessWire 3.0.141, introduce ModulesManager 2, and take a closer look at a really interesting new site of the week. Read on!
    Weekly.pw / 21 September 2019
  • ProcessWire 3.0.141 core updates
    This week’s dev branch version brings you improvements to ProcessWire’s $input->cookie API variable, adds a new hook, and now lets you modify system URLs and paths at runtime, along with a few examples to demonstrate just how useful this can be. 
    Blog / 20 September 2019
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer