# Automatic SQL badges not firing ":user\_badge\_granted" trigger

**URL:** https://meta.discourse.org/t/automatic-sql-badges-not-firing-user-badge-granted-trigger/34962
**Category:** Bug
**Created:** [2015年十月27日 11:11 UTC](https://meta.discourse.org/t/automatic-sql-badges-not-firing-user-badge-granted-trigger/34962 "2015-10-27T11:11:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thomaspurchas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomaspurchas/32/115664_2.png) [@thomaspurchas](https://meta.discourse.org/u/thomaspurchas)
#### Post date: [2015年十月27日 11:11 UTC](https://meta.discourse.org/t/automatic-sql-badges-not-firing-user-badge-granted-trigger/34962/1 "2015-10-27T11:11:40Z")

</div>

Been trying to use the `:user_badge_granted` to trigger a task in a plugin I’ve written. I’m currently using the `:user_badge_granted` as a proxy for a user updated trigger (I haven’t had time to create a pull request for a user updated trigger).

I’ve noticed that badges that are automatically granted using SQL, and triggered on user info updates don’t fire the `:user_badge_granted` trigger, and thus not firing my plugins task.

[Link to post describing my plugin’s purpose](https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045/255)  
[Plugin in question](https://github.com/WarwickFilmSoc/discourse-group-sync)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年十月28日 05:22 UTC](https://meta.discourse.org/t/automatic-sql-badges-not-firing-user-badge-granted-trigger/34962/2 "2015-10-28T05:22:17Z")

</div>

Yeah, this is a bit of a feature req… its a pretty tricky change, feel free to give it a shot in a PR and we can review.
