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

site membership (Trac #3416) #3416

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

site membership (Trac #3416) #3416

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

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/3416 on 41339893-01-24 by trac user coldtrick, assigned to unknown.

Elgg version: 1.7

In Elgg 1.7 a fix was made to add a relationship between a new user and the site he/she registered on (see #804), however all existing users from an installation < 1.7 were not given this relationship.

So if I ask an Elgg 1.7+ site (which was migrated from < 1.7) all user with a relationship 'member_of_site' I only get the newly created users, not all existing users.

Should be fixed with a SQL update script

@elgg-gitbot
Copy link
Author

trac user coldtrick wrote on 41339933-06-21

sql could be
SELECT e.guid
FROM entities e
WHERE e.type = 'user' AND e.guid NOT IN
(SELECT guid_one FROM
entity_relationships WHERE guid_two = 1 AND relationship = 'member_of_site')

to get all user_guid missing the relationship

@elgg-gitbot
Copy link
Author

cash wrote on 41347124-08-06

I'm not sure we can fix this in 1.7.x becomes it requires an upgrade. In 1.8.0, we add a better upgrade system so that it is easier to have parallel development branches with upgrade scripts in both. Would it be prove difficult to you if we delayed until 1.8.0 on this?

@elgg-gitbot
Copy link
Author

ewinslow wrote on 41348580-07-25

Forgive my ignorance, but why is site_guid not enough?

@elgg-gitbot
Copy link
Author

cash wrote on 41348640-11-25

My guess is because it is possible to run multiple sites off a single install and a user can be members of more than one site.

@elgg-gitbot
Copy link
Author

brettp wrote on 41352652-09-11

The upgrade system allows upgrades to the 1.7 branch to be merged to 1.8 Just create the upgrade filename in 1.7 style then merge it as is to trunk. 1.8's upgrade system should pick up that it hasn't been run and run it even if 1.8's version is higher.

@elgg-gitbot
Copy link
Author

trac user coldtrick wrote on 41353341-11-11

Replying to ewinslow:

Forgive my ignorance, but why is site_guid not enough?

As Cash said, a user can be on more than one site. Also if you ask #site->getMembers() not all users will show up.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.7.9 by cash on 41371801-01-22

@elgg-gitbot
Copy link
Author

brettp wrote on 41406229-04-05

(In [svn:9119]) Fixes #3416. Making sure all users have the relationship member_of_site to their primary site. If you're using any unsupported multisite features you will need to add relationships to other site guids manually.

@elgg-gitbot
Copy link
Author

brettp wrote on 41437305-03-14

(In [svn:9144]) Refs #3510, #3416. Merged update for making sure users have relationship member_of on site object.

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