This patch adds the view/edit/delete functionality to the subusers 7.x module as listed at #1145350: Finish 7.x-2.x port.

Comments

larowlan’s picture

subscribe

Jb33’s picture

subscribe

roderik’s picture

Tested, it works.

(Note the default view currently doesn't work; also not after applying #1204692: Change default views to reflect upstream changes to VBO + relation. User names are not made into links and edit links are not shown. But I don't care; I just created a different view with fields linked to user/[uid] and user/[uid]/edit. With that, if you view another user's subusers... the view shows links but they give "permission denied". That's fine for my case.)

I added the last code block in the attached patch. This usage warrants caching inside subuser_load_all().

roderik’s picture

Status: Needs review » Reviewed & tested by the community

Meh. My addition clashes with #1256938: subuser_load_all not returning the proper parent user ids and not returning userids if we have defined another relation.

I'm setting RTBC FOR THE ORIGINAL PATCH. Caching needs to be re-added to #1256938. (I'm not doing that for the moment.)

roderik’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.87 KB

Ignore #3/4. Caching has been deleted again.

This patch adds support for Profile2 module (the default solution for profiles, even though it's in contrib).

graper’s picture

there is an error in your patch, what becomes line 66 has global $suer, but it should be $user

7wonders’s picture

StatusFileSize
new4.51 KB

Here is the view/edit/delete extra permissions against the latest dev.

sathishdevan’s picture

@ 7wonders

Is this patch added in the current snapshot of subuser module available in the below repo.

http://drupalcode.org/project/subuser.git

Regards,
Sathishkumar V

sathishdevan’s picture

@ 7wonders

I have applied the above patch and thiis allows the parent user to edit/view/delete their subusers, but the view(subuser view) shown on the subuser tab of parent doesn't have the edit/view/delete links.

sathishdevan’s picture

@7wonders

Sorry, I have missed the patch from the below link.

http://drupal.org/node/1204692

Now, I have applied the patch and the subuser view works as expected. Thanks for Your patches. It made my life much easier.

sokrplare’s picture

Status: Needs review » Reviewed & tested by the community

Confirming the patch in #7 is working beautifully for me (also using #1204692-8: Change default views to reflect upstream changes to VBO + relation).

sokrplare’s picture

Hmmm...correction, seems like View and Edit are working, but Delete may have some issues:

  1. No "Delete" button appears at the bottom of the user profile page when editing
  2. When I click the Delete link on the Subusers tab it goes to the cancel account page to confirm, then after confirming the message appears: "A confirmation request to cancel your account has been sent to your e-mail address." I haven't seen that come through in email yet though and not sure why that happens (maybe some D7 cancellation flow I'm not familiar with?)
iRex’s picture

I am getting a "Fatal error: Call to undefined method stdClass::init_display() in ***\views\views.module on line 609" when I try to enable the snapshot mentioned in #8 above and applying the patch here http://drupal.org/node/1204692.

Clearly I'm doing something wrong. Can somebody please help?

iRex’s picture

The problem seem to lie with the subuser switch submodule. I disabled it in the database and cleared the cache and I was able to escape the WSOD. Does anyone have an idea why this happening?

sansui’s picture

With the patch I receive this - Notice: Trying to get property of non-object in subuser_load_all() (line 280 of /home/zzz/public_html/sites/all/modules/subuser/subuser.module) (on the user account page, after that user account has created a subuser)

7wonders’s picture

I just posted a working version of the module on this thread - https://drupal.org/node/1508334

lauriii’s picture

Commited and pushed, thanks guys!

lauriii’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

  • Commit 1ac85f4 on 7.x-2.x, 8.x-1.x by lauriii:
    Issue #1213566 by roderik, nick_schuch, 7wonders: Add View/Edit/Delete...
bleg’s picture

It would be good to have the option to delete without sending a confirmation email to the user. Either that or have the ability to block the user.

dddbbb’s picture

@bleg - Not a bad idea but this issue's closed. Open a new issue?

adamtong’s picture

any update about #21?