diff --git a/peertube-plugin-auth-ldap/main.js b/peertube-plugin-auth-ldap/main.js index 6854b93..ee93863 100644 --- a/peertube-plugin-auth-ldap/main.js +++ b/peertube-plugin-auth-ldap/main.js @@ -173,6 +173,9 @@ async function login (peertubeHelpers, settingsManager, options) { let username = user[usernameProperty] || '' username = username.replace(/[^a-z0-9._]/g, '_') + let email = user[mailProperty] + if (Array.isArray(email)) email = email[0] + return res({ username, email: user[mailProperty]