extracting username from email for cloudron mail is now done in user.js

This commit is contained in:
Johannes Zellner
2016-09-27 16:21:58 +02:00
parent ea87b3e876
commit 2a7de5dab7

View File

@@ -65,7 +65,7 @@ function userSearch(req, res, next) {
uid: entry.id,
mail: entry.email,
// TODO: check mailboxes before we send this
mailAlternateAddress: entry.username + '@' + config.fqdn(),
mailAlternateAddress: entry.alternativeEmail,
displayname: displayName,
givenName: firstName,
username: entry.username,
@@ -244,13 +244,7 @@ function authenticateUser(req, res, next) {
if (attributeName === 'mail') {
api = user.verifyWithEmail;
} else if (commonName.indexOf('@') !== -1) { // if mail is specified, enforce mail check
var parts = commonName.split('@');
if (parts[1] === config.fqdn()) { // internal email, verify with username
commonName = parts[0];
api = user.verifyWithUsername;
} else { // external email
api = user.verifyWithEmail;
}
api = user.verifyWithEmail;
} else if (commonName.indexOf('uid-') === 0) {
api = user.verify;
} else {