mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Lowercase email on local auth register
This commit is contained in:
parent
02129dc1d8
commit
18e8d69775
@ -256,11 +256,11 @@ module.exports = {
|
||||
return ctx.badRequest(null, ctx.request.admin ? [{ messages: [{ id: 'Auth.form.error.role.notFound' }] }] : 'Impossible to find the root role.');
|
||||
}
|
||||
|
||||
// Check if the provided identifier is an email or not.
|
||||
const isEmail = emailRegExp.test(params.identifier);
|
||||
// Check if the provided email is valid or not.
|
||||
const isEmail = emailRegExp.test(params.email);
|
||||
|
||||
if (isEmail) {
|
||||
params.identifier = params.identifier.toLowerCase();
|
||||
params.email = params.email.toLowerCase();
|
||||
}
|
||||
|
||||
params.role = role._id || role.id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user