# Conditional email verification

**URL:** <https://community.parseplatform.org/t/conditional-email-verification/1262>\
**Category:** Parse Server 📡\
**Tags:** email-verification\
**Created:** [January 25, 2021, 8:26pm UTC](https://community.parseplatform.org/t/conditional-email-verification/1262 "2021-01-25T20:26:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CastAsHuman](https://community.parseplatform.org/user_avatar/community.parseplatform.org/castashuman/32/239_2.png) [@CastAsHuman](https://community.parseplatform.org/u/CastAsHuman)\
**Post date:** [January 25, 2021, 8:26pm UTC](https://community.parseplatform.org/t/conditional-email-verification/1262/1 "2021-01-25T20:26:51Z")

</div>

I have two groups of users, one of which needs to have email verification and the other doesn’t.  
Is it possible to mark some users as verified, without having to send the email?

---

<div class="post-metadata">

**Author:** ![Moumouls](https://community.parseplatform.org/user_avatar/community.parseplatform.org/moumouls/32/332_2.png) [@Moumouls](https://community.parseplatform.org/u/Moumouls)\
**Post date:** [January 25, 2021, 10:06pm UTC](https://community.parseplatform.org/t/conditional-email-verification/1262/2 "2021-01-25T22:06:01Z")

</div>

Did you try a beforeSave/afterSave cloud function on Parse User class, and force the email verified value during the object creation ?

---

<div class="post-metadata">

**Author:** ![CastAsHuman](https://community.parseplatform.org/user_avatar/community.parseplatform.org/castashuman/32/239_2.png) [@CastAsHuman](https://community.parseplatform.org/u/CastAsHuman)\
**Post date:** [January 26, 2021, 2:29pm UTC](https://community.parseplatform.org/t/conditional-email-verification/1262/3 "2021-01-26T14:29:31Z")

</div>

I just tried that! Even though `emailVerified` is now set to `true`, the email is still being sent!

---

<div class="post-metadata">

**Author:** ![Manuel](https://community.parseplatform.org/user_avatar/community.parseplatform.org/manuel/32/186_2.png) [@Manuel](https://community.parseplatform.org/u/Manuel)\
**Post date:** [January 26, 2021, 4:29pm UTC](https://community.parseplatform.org/t/conditional-email-verification/1262/4 "2021-01-26T16:29:14Z")

</div>

I think a proper solution would mean not to “fake-verify” a user’s email address in a beforeSave, but to explicitly not require it.

There may be use cases where a user converts from one group to another, where email verification is suddenly needed. A fake-verified account could not easily be distinguished from an actual verified account.

Please feel free to open a feature request in the Parse Server repo and maybe look into Parse Server’s email verification mechanism, specifically the `UserController` and we can explore possible concepts.

---

<div class="post-metadata">

**Author:** ![dblythy](https://community.parseplatform.org/user_avatar/community.parseplatform.org/dblythy/32/231_2.png) [@dblythy](https://community.parseplatform.org/u/dblythy)\
**Post date:** [February 5, 2023, 7:23am UTC](https://community.parseplatform.org/t/conditional-email-verification/1262/5 "2023-02-05T07:23:51Z")

</div>

> <https://github.com/parse-community/parse-server/pull/8425>
>
> \## Pull Request
> 
> \- Report security issues \[confidentially\](https://github.com/…parse-community/parse-server/security/policy).
> \- Any contribution is under this \[license\](https://github.com/parse-community/parse-server/blob/alpha/LICENSE).
> \- Link this pull request to an \[issue\](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
> 
> \## Issue
> 
> 
> Currently it is not possible to decide what users should and shouldn't receive verification emails.
> 
> Closes: #7144
> 
> \## Approach
> 
> 
> wip
> 
> 
> \## Tasks
> 
> 
> \- \[x\] Add tests
