mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: user: update email normalization (#812)
This commit is contained in:
1 parent
f38cf6e02a
commit
1a981b9bf5
2 files changed
+5
-8
No files matched your search
@@ -177,7 +177,8 @@ export class User {
|
||||
|
||||
function handleMailLower(mail: string) {
|
||||
const [n, d] = mail.trim().toLowerCase().split('@');
|
||||
return `${n.replace(/\./g, '').replace(/\+.$/, '')}@${d === 'googlemail.com' ? 'gmail.com' : d}`;
|
||||
const [name] = n.split('+');
|
||||
return `${name.replace(/\./g, '')}@${d === 'googlemail.com' ? 'gmail.com' : d}`;
|
||||
}
|
||||
|
||||
async function initAndCache(udoc: Udoc, dudoc, scope: bigint = PERM.PERM_ALL) {
|
||||
|
||||
Reference in new issue
Block a user