The Advanced User support described in the docs works fine when Ban and Unpublish is paired with advuser-6.x-2.x, but does not work with advuser-6.x-3.x.

CommentFileSizeAuthor
#7 advuser.hook_user_operations.941066.7.patch1018 bytessalvis

Comments

yelvington’s picture

I'll take a look.

If advuser 3.x isn't supporting bulk operations, I'd regard that as a showstopper regression in advuser. We use it on all our sites, and require bulk operations.

It's possible to replicate the functionality of advuser using Views Bulk Operations.

yelvington’s picture

Assigned: Unassigned » yelvington
yelvington’s picture

Title: Advanced User support not working with advuser-6.x-3.x » Advuser 3.x doesn't use Drupal bulk operations
Project: Ban and Unpublish » Advanced User
Version: 6.x-1.x-dev » 6.x-3.x-dev
Component: Miscellaneous » Feature
Assigned: yelvington » Unassigned

Forwarding this to the advuser project, noted as an undesirable feature regression.

It appears that advuser 3.x implements its own actions and ignores operations defined by http://api.drupal.org/api/function/hook_user_operations.

salvis’s picture

Category: feature » bug

I agree that using hook_user_operations() is a must-have feature!

Anonymous’s picture

Category: bug » task
Anonymous’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Priority: Normal » Major

Pushing to tasks to 7.x.

salvis’s picture

StatusFileSize
new1018 bytes

This patch is all that's needed.

salvis’s picture

Actually, there's one more thing: D7 core has a Cancel operation, but no Delete operation.

So, depending on your strategy, you either unset($operations['cancel']), or you implement it instead of your Delete.

salvis’s picture

Status: Active » Needs review
Anonymous’s picture

Assigned: Unassigned »
Priority: Major » Normal
Status: Needs review » Needs work

I need to review this more.

salvis’s picture

At the rate that advuser is progressing, it makes no sense to define hook_advuser_operations(). No third party will bother.

You can keep hook_advuser_operations() for your own use, but you must add support for core's hook_user_operations(). Can we agree on that?

Keeping both 'Cancel' and 'Delete' is really no big deal, certainly less so than locking out the modules that want to support the standard hook_user_operations(). So, please commit this.

Anonymous’s picture

Salvis, I can agree to it if you take over lead on the project. I've no time for it this year.

salvis’s picture

No, sorry, there's too much functionality in advuser that I'll never use, and I'm already overcommitted.

Besides, I'm already maintaining Mail Editor — I'd go nuts maintaining this duplicate functionality...

natemow’s picture

Assigned: » natemow
Status: Needs work » Fixed

hook_advuser_operations remains for now, but @salvis patch from https://drupal.org/node/941066#comment-6802656 now pushed to 7.x-3.x. Also removed duplicate block/unblock and add/remove role ops from Advuser, since core User mod can now just handle those directly.

salvis’s picture

Great, thank you!

Status: Fixed » Closed (fixed)

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