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

Added option to query User object for payload UID #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ravenstar
Copy link

This PR adds an admin option that if enabled will query the User object for the id found in the cookie payload if not first found in the usual base app object.

- Added `useUserObject` option: allow User object to be queried for uid from payload.
Copy link
Owner

@julianlam julianlam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't approve this until the indentation issues are resolved. In particular. session-sharing.tpl's entire file is changed because your editor converted to spaces, I think. Let's keep it to tabs here.

Also can you elaborate on the use of this admin option? Thanks

@@ -1,6 +1,6 @@
{
"name": "nodebb-plugin-session-sharing",
"version": "4.5.0",
"version": "4.5.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this line please?

@@ -229,6 +229,9 @@ plugin.findOrCreateUser = function (userData, callback) {
}
queries.uid = async.apply(db.sortedSetScore, plugin.settings.name + ':uid', userData.id);

if (plugin.settings.useUserObject === 'on')
queries.id = async.apply(db.getObjectField, 'user:' + userData.id, 'uid');

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation should be tabs for this plugin, thanks

@julianlam julianlam self-assigned this Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants