Fix user profile photo might not replace to proper size
This commit is contained in:
parent
1ca39d9c8e
commit
2aee0f267c
1 changed files with 4 additions and 4 deletions
|
@ -105,8 +105,8 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
break;
|
break;
|
||||||
case "gitlab":
|
case "gitlab":
|
||||||
photo = profile.avatarUrl;
|
photo = profile.avatarUrl;
|
||||||
if (bigger) photo.replace(/(\?s=)\d*$/i, '$1400');
|
if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400');
|
||||||
else photo.replace(/(\?s=)\d*$/i, '$196');
|
else photo = photo.replace(/(\?s=)\d*$/i, '$196');
|
||||||
break;
|
break;
|
||||||
case "dropbox":
|
case "dropbox":
|
||||||
//no image api provided, use gravatar
|
//no image api provided, use gravatar
|
||||||
|
@ -116,8 +116,8 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
break;
|
break;
|
||||||
case "google":
|
case "google":
|
||||||
photo = profile.photos[0].value;
|
photo = profile.photos[0].value;
|
||||||
if (bigger) photo.replace(/(\?sz=)\d*$/i, '$1400');
|
if (bigger) photo = photo.replace(/(\?sz=)\d*$/i, '$1400');
|
||||||
else photo.replace(/(\?sz=)\d*$/i, '$196');
|
else photo = photo.replace(/(\?sz=)\d*$/i, '$196');
|
||||||
break;
|
break;
|
||||||
case "ldap":
|
case "ldap":
|
||||||
//no image api provided,
|
//no image api provided,
|
||||||
|
|
Loading…
Reference in a new issue