mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-06 22:45:40 +02:00
Make emails unique
Emails are made unique. When user attempts to sign in through a provider in which his email is one that is already registered, user is redirected to the signin page with an error passed as a query string parameter.
This commit is contained in:
@@ -8,10 +8,10 @@ var getUniqueErrorMessage = function(err) {
|
||||
|
||||
try {
|
||||
var fieldName = err.err.substring(err.err.lastIndexOf('.$') + 2, err.err.lastIndexOf('_1'));
|
||||
output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exist';
|
||||
output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exists';
|
||||
|
||||
} catch(ex) {
|
||||
output = 'Unique field already exist';
|
||||
output = 'Unique field already exists';
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user