Fixed mail notification issues in user module #1142 discovered by @Marc-pi