auto-assign profile pic
This commit is contained in:
parent
a632baf6cb
commit
d4af131481
@ -137,6 +137,7 @@
|
||||
oAuthid: profile.id,
|
||||
handle: profile.displayName,
|
||||
email: profile.emails[0].value,
|
||||
picture: profile.picture,
|
||||
isAdmin: profile.isAdmin
|
||||
}, function(err, user) {
|
||||
if (err) {
|
||||
@ -175,6 +176,7 @@
|
||||
profile.displayName = data.display_name;
|
||||
profile.emails = [{ value: data.email }];
|
||||
profile.isAdmin = data.privilege === 5;
|
||||
profile.picture = 'https://icynet.eu/api/avatar/' + data.id
|
||||
|
||||
// Do you want to automatically make somebody an admin? This line might help you do that...
|
||||
// profile.isAdmin = data.isAdmin ? true : false;
|
||||
@ -225,7 +227,8 @@
|
||||
if (!uid) {
|
||||
User.create({
|
||||
username: payload.handle,
|
||||
email: payload.email
|
||||
email: payload.email,
|
||||
picture: payload.picture
|
||||
}, function(err, uid) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
|
Loading…
Reference in New Issue
Block a user