# Notification emails of new users not being sent with SSO

**URL:** <https://meta.discourse.org/t/notification-emails-of-new-users-not-being-sent-with-sso/84212>\
**Category:** WordPress\
**Created:** [March 30, 2018, 9:27am UTC](https://meta.discourse.org/t/notification-emails-of-new-users-not-being-sent-with-sso/84212 "2018-03-30T09:27:00Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [March 7, 2019, 11:10pm UTC](https://meta.discourse.org/t/notification-emails-of-new-users-not-being-sent-with-sso/84212/10 "2019-03-07T23:10:55Z")

</div>

I still think it might be more maintainable to handle this on the WordPress end by adding user metadata fields to indicate whether or not a user should be allowed to login to Discourse.

If you want to do this through a Discourse plugin, you can find the available SSO params near the top of this file: [https://github.com/discourse/discourse/blob/master/lib/single\_sign\_on.rb](https://github.com/discourse/discourse/blob/master/lib/single_sign_on.rb). If you need an `approved` parameter, you could add it through a plugin.

You’d need to find a way to reopen the [match\_email\_or\_create\_user](https://github.com/discourse/discourse/blob/master/app/models/discourse_single_sign_on.rb#L161) method. That method returns a User object, so you could try redefining the method in a module, and call `super` within the redefined method to get the User. You could then check for the value of the `approved` parameter or the value of the `add_groups` parameter, and approve users if they meet your requirements.

---

_[View the full topic](https://meta.discourse.org/t/notification-emails-of-new-users-not-being-sent-with-sso/84212)._
