<p>You can use the request service. <em>craft()->request->isCpRequest()</em> or <em>craft()->request ->isSiteRequest()</em></p>

<p><a href="https://craftcms.com/classreference/services/HttpRequestService#isCpRequest-detail" rel="nofollow noreferrer">https://craftcms.com/classreference/services/HttpRequestService#isCpRequest-detail</a></p>

CC BY-SA 3.0
2017-04-08T17:55:06.147Z
2017-04-08T18:03:48.297Z
2017-04-08T18:03:48.297Z
Selvin Ortiz
<p>How can I listen in my plugin to see if</p>

<pre><code>craft()-&gt;on('users.saveUser', function(Event $event) {
</code></pre>

<p>onsaveUser came from front end creation or control panel ?</p>

<users>
User registration plugin listening
# User registration plugin listening

(Asked by: username_0 on 2017-04-08)

How can I listen in my plugin to see if
craft()->on('users.saveUser', function(Event $event) {

onsaveUser came from front end creation or control panel ?

**Tags:** users

---

## 1 answers

### Answer by username_1 on 2017-04-08. Score: 3

You can use the request service. *craft()->request->isCpRequest()* or *craft()->request ->isSiteRequest()*

<https://craftcms.com/classreference/services/HttpRequestService#isCpRequest-detail>


---

