jasonbhart / mmh

"Meet Me Here" website to help you organize ad hoc events with your friends on the fly
0 stars 0 forks source link

Duplicate entries in the user table recorded for the same Facebook account #507

Closed jasonbhart closed 8 years ago

jasonbhart commented 8 years ago

We are not recording the right number for the Facebook ID of a user and thus we are creating duplicate users in the user table for each unique Facebook user.

domthewop commented 8 years ago

See documentation: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus

You are using response.id, this may not be correct. Rather, response.userID seems to be correct. You are likely accessing the id of the response itself, not the id of the user.

diepbuihuu commented 8 years ago

Facebook users are now stored in facebook table (after login/logout ticket) and there seem to be no duplication. We do have old entries in user table with id facebook:*\ but they are created from Yuriy time and are not used anymore. We can safely remove them.

diepbuihuu commented 8 years ago

However, we do have a lot of not-active anonymous user. A lot of them are created by me and Loi as the result of testing process (we need to open multiple tab to create auto-group). We'll need some mechanism to clean up this type of user, Eg: Delete anonymous user which visited site more than 1 day ago. @jasonbhart Are we on the same page? How do you think?

jasonbhart commented 8 years ago

Yes, however lets clean up anonymous users which havent logged in for 7 days.

On Tue, Jan 5, 2016 at 1:57 AM, diepbuihuu notifications@github.com wrote:

However, we do have of not-active anonymous user. A lot of them are created by me and Loi as the result of testing process (we need to open multiple tab to create auto-group). We'll need some mechanism to clean up this type of user, Eg: Delete anonymous user which visited site more than 1 day ago. @jasonbhart https://github.com/jasonbhart Are we on the same page? How do you think?

— Reply to this email directly or view it on GitHub https://github.com/jasonbhart/mmh/issues/507#issuecomment-168955582.

[image: photo] Jason B. Hart m:(408) 646-4677 | e:jasonbhart@gmail.com http://facebook.com/jasonbhart http://www.linkedin.com/in/jasonbhart http://twitter.com/jasonbhart

diepbuihuu commented 8 years ago

https://github.com/jasonbhart/mmh/commit/c43b46053e5b408faaa7107d3463a7aeb1df2248