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

Widget referred to generic entity (Trac #1391) #1391

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 2 comments
Closed

Widget referred to generic entity (Trac #1391) #1391

elgg-gitbot opened this issue Feb 16, 2013 · 2 comments

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/1391 on 39917955-12-18 by trac user alivin70, assigned to cash.

Elgg version: 1.6

Sometimes widget are not referred to users but to other entities.

An example is che custom_index_widgets plugin, where widgets should be referred to a site entity, not to the admin.

I propose to change the function add_widget() in engine/lib/widget.php
at line 232 change:

if ($user = get_user($user_guid)) {

with

if ($user = get_entity($user_guid)) {

In my knowledge that's the only point where the $user_guid is cheked to by the guid of a ElggUser instance.

I made that change and everything works as before.

In a later clean up of the code the word "user" can be removed in order to make the code clearer.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.7.2 by cash on 40524327-07-19

@elgg-gitbot
Copy link
Author

cash wrote on 40524331-01-01

(In [svn:6683]) Fixes #1391 - widget ownership is not limited to users

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

No branches or pull requests

1 participant