I really appreciate this little module. A while ago I wrote another module that used TAC lite to grant content access. I am now in the process of writing another module that grants & revokes access using TAC lite and thought it wise to share my code in the hopes that it gets committed so that other modules can reuse this modules functionality.

Two simple functions one to grant and the other revoke user access to terms controlled by TAC lite.

Grant function checks for validity of inputs, vocabulary, and term ids. The revoke assumes the saved terms were valid when created and so does not check them before removing. Both functions only save the account if there is a change to make. They return FALSE is there was an error otherwise return the modified user account.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tinker’s picture

Status: Active » Needs review
FileSize
3.06 KB

Attached patch.

tinker’s picture

Status: Needs review » Needs work

These only use the default scheme so they need work.