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

User's "picture" isn't used #14

Open
alecananian opened this issue Jun 26, 2016 · 1 comment
Open

User's "picture" isn't used #14

alecananian opened this issue Jun 26, 2016 · 1 comment

Comments

@alecananian
Copy link

alecananian commented Jun 26, 2016

Hi all,
Not sure if my setup is incorrect or if this is really the case, but it appears as though the picture property in the supplied user data isn't used anywhere. When I set the value, I didn't see a new user's picture/avatar being set to what I provided, so I dug into the code and it looks like the NodeBB core doesn't read the picture value passed into the data object of User.create:

var userData = {
    'username': data.username,
    'userslug': data.userslug,
    'email': data.email,
    'joindate': timestamp,
    'lastonline': timestamp,
    'picture': '',
    'fullname': data.fullname || '',
    'location': '',
    'birthday': '',
    'website': '',
    'signature': '',
    'uploadedpicture': '',
    'profileviews': 0,
    'reputation': 0,
    'postcount': 0,
    'topiccount': 0,
    'lastposttime': 0,
    'banned': 0,
    'status': 'online'
};

I'd also like the ability to set things like the location, website and joindate because I have these values for a lot of users on my primary login's account system already.

Would it make sense to edit the plugin to allow these values in the payload and then after the create call, update the profile with whatever other values we have available? The concept would be similar to @Gacnt's pull request, but would occur during user creation instead.

@alecananian
Copy link
Author

In case anybody else wants to implement an extension like this, I created a fork to fit my needs. Here are the main changes: https://github.com/alecananian/nodebb-plugin-session-sharing-extended/commit/7a7dff18abb633fd03ecee65a3646ef1fefd0b6d

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

No branches or pull requests

1 participant