Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursive disable_entity fails if the code is not logged-in (Trac #1196) #1196

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 9 comments
Closed
Labels
Milestone

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/1196 on 39658668-09-20 by trac user kevinjardine, assigned to unknown.

Elgg version: 1.6

Elgg 1.6 displays a:

"Failed to load new ElggObject from GUID:XXX"

message if a user registers and one or more default widgets have been defined.

The code creates the user and the widget, and then disables the user (until reactivated by the confirmation link).

When disabling the user, the code also attempts to disable all the objects owned by the user, including the widget. However, the code is running with no user logged in, and the widget default access control is set to "Logged-in users". Hence the error is generated.

The disable_entity function attempts to do something to route around Elgg's access controls but this apparently no longer works under Elgg 1.6.

@elgg-gitbot
Copy link
Author

brettp wrote on 39660109-06-02

(In [svn:3450]) Fixes #1196: ElggEntity::disable() now accepts a 2nd arg for recursive. New users are not recursively disabled for plugins that need to create entities owned by the new user upon entity creation.

@elgg-gitbot
Copy link
Author

brettp wrote on 39660146-01-18

Reopening because this commit doesn't solve the actual problem, but solves a symptom. Users are now registered as expected, but you still cannot recursively disable an entity when logged out.

@elgg-gitbot
Copy link
Author

brettp wrote on 40088350-09-06

The problem is that the recursive delete function's $__RECURSIVE_DELETE_TOKEN is based upon logged in user id.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8 by brettp on 40088350-09-06

@elgg-gitbot
Copy link
Author

Title changed from disable_entity fails if the code is not logged-in to recursive disable_entity fails if the code is not logged-in by brettp on 40088350-09-06

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8.1 by ewinslow on 40895194-04-04

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8.4 by cash on 42022969-12-20

@elgg-gitbot
Copy link
Author

trac user Brett Profitt wrote on 42064637-11-03

Fixes #1196. Added elgg_set_ignore_access() calls to disable_entity() when called with recursive = true.
Changeset: 84f5b43

@elgg-gitbot
Copy link
Author

trac user Brett Profitt wrote on 42088991-01-06

Fixes #1196. Added elgg_set_ignore_access() calls to disable_entity() when called with recursive = true.
Changeset: 84f5b43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant