Node.js based forum software built for the modern web
Firing new hook `filter:auth.list`
Julian Lam78863a438f32
diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.jsonindex b4d3dcaaf5..9a019791be 100644--- a/public/language/en_GB/user.json+++ b/public/language/en_GB/user.json@@ -101,5 +101,9 @@"grouptitle": "Select the group title you would like to display","no-group-title": "No group title",- "select-skin": "Select a Skin"+ "select-skin": "Select a Skin",++ "sso.title": "Single Sign-on Services",+ "sso.associated": "Associated with",+ "sso.not-associated": "Click here to associate with"}diff --git a/src/controllers/accounts.js b/src/controllers/accounts.jsindex 18f2be4bef..174bb6be5c 100644--- a/src/controllers/accounts.js+++ b/src/controllers/accounts.js@@ -49,7 +49,11 @@ function getUserDataByUserSlug(userslug, callerUID, callback) {},groups: function(next) {groups.getUserGroups([uid], next);- }+ },+ sso: async.apply(plugins.fireHook, 'filter:auth.list', {+ uid: uid,+ associations: []+ })}, function(err, results) {if (err || !results.userData) {return callback(err || new Error('[[error:invalid-uid]]'));@@ -88,6 +92,7 @@ function getUserDataByUserSlug(userslug, callerUID, callback) {userData.disableSignatures = meta.config.disableSignatures !== undefined && parseInt(meta.config.disableSignatures, 10) === 1;userData['email:confirmed'] = !!parseInt(userData['email:confirmed'], 10);userData.profile_links = results.profile_links;+ userData.sso = results.sso.associations;userData.status = require('../socket.io').isUserOnline(userData.uid) ? (userData.status || 'online') : 'offline';userData.banned = parseInt(userData.banned, 10) === 1;userData.website = validator.escape(userData.website);diff --git a/src/file.js b/src/file.jsindex b606c43afc..94465b4ad7 100644--- a/src/file.js+++ b/src/file.js@@ -55,7 +55,7 @@ file.isFileTypeAllowed = function(path, allowedExtensions, callback) {var uploadedFileExtension = mime.extension(mimeType);if (allowedExtensions.indexOf(uploadedFileExtension) === -1) {- return callback(new Error('[[error:invalid-file-type, ' + allowedExtensions.join('-') + ']]'));+ return callback(new Error('[[error:invalid-file-type, ' + allowedExtensions.join(', ') + ']]'));}callback();