# Get current user email

**URL:** <https://forum.camunda.io/t/get-current-user-email/27133>\
**Category:** Discussion & Questions\
**Tags:** cockpit, admin\
**Created:** [April 30, 2021, 1:10pm UTC](https://forum.camunda.io/t/get-current-user-email/27133 "2021-04-30T13:10:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hassang](https://forum.camunda.io/user_avatar/forum.camunda.io/hassang/32/16498_2.png) [@hassang](https://forum.camunda.io/u/hassang)\
**Post date:** [April 30, 2021, 10:00pm UTC](https://forum.camunda.io/t/get-current-user-email/27133/2 "2021-04-30T22:00:18Z")

</div>

Hi @kok,  
Try below snip of code.

```
<script cam-script type="text/form-script">
inject([ '$rootScope', '$scope', 'camAPI', function($rootScope, $scope, camAPI) {

	var userName = $rootScope.authentication.name;
	var User = camAPI.resource('user');

	User.profile({id: userName}, function(err, data) {
		if (!err) {
			//alert('Data: ' + JSON.stringify(data));
			alert('Email: ' + data.email);
		}
	});
}]);
</script>
```

---

_[View the full topic](https://forum.camunda.io/t/get-current-user-email/27133)._
