I'm looking for a way to hide the "Add user" action link from the top of the confirmation page when using the user administration VBO. The patch from https://www.drupal.org/node/2177539#comment-8951467 seems like a good place to start (add an access_callback to the action link and check for "cancel" in $POST), but I don't know how to access the current vbo form step from the user_create_access function provided by the patch linked above.

Any ideas on this?

CommentFileSizeAuthor
#1 hide-user-add-action.patch850 bytesPascalAnimateur

Comments

PascalAnimateur’s picture

StatusFileSize
new850 bytes

No need to check for 'cancel' operation .. the Add user link appears just fine on admin/people with this patch and it correctly hides when performing actions on the users (cancel, vbo action, etc)

PascalAnimateur’s picture

This issue is broader than just the "Add user" link.. in fact ALL action links should be hidden on ALL confirmation pages.

Looking for a more general solution for this.. maybe views_bulk_operations should be patched to solve this issue in other contexts (and not just admin_views) ?

PascalAnimateur’s picture

Status: Active » Needs review

See related issue #2318273: Hide action links from confirmation pages for proposed solution...

Status: Needs review » Needs work

The last submitted patch, 1: hide-user-add-action.patch, failed testing.

damiankloip’s picture

Status: Needs work » Fixed

You should use a hook_menu_alter implementation in one of your custom modules. Not hack the user.module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.