# Accessing mobile user registration details using XPath

**URL:** <https://forum.dimagi.com/t/accessing-mobile-user-registration-details-using-xpath/2707>\
**Category:** Users\
**Created:** [April 29, 2016, 8:25am UTC](https://forum.dimagi.com/t/accessing-mobile-user-registration-details-using-xpath/2707 "2016-04-29T08:25:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chaiwa\_Berian](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaiwa\_Berian](https://forum.dimagi.com/u/Chaiwa_Berian)\
**Post date:** [April 29, 2016, 8:25am UTC](https://forum.dimagi.com/t/accessing-mobile-user-registration-details-using-xpath/2707/1 "2016-04-29T08:25:10Z")

</div>

Can someone guide me on how I can use xpath in my app to access details  
like first name and last name of the currently logged-in user? I have seen  
this line of code which gives me access to the "username" of the currently  
logged-in user: _instance('commcaresession')/session/context/username_

Is there something similar to access other user registration details like  
we can with the username? Any documentation about such kind of things?

Thanks,  
Chaiwa.

---

<div class="post-metadata">

**Author:** ![Simon\_Kelly](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/simon_kelly/32/494_2.png) [@Simon\_Kelly](https://forum.dimagi.com/u/Simon_Kelly)\
**Post date:** [April 29, 2016, 1:38pm UTC](https://forum.dimagi.com/t/accessing-mobile-user-registration-details-using-xpath/2707/2 "2016-04-29T13:38:06Z")

</div>

Hi Chalwa

You can access other information. This page on the wiki should help:  
[https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data](https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data)

> **···**
>
> On 29 April 2016 at 10:25, Chaiwa Berian wrote:
> 
> > Can someone guide me on how I can use xpath in my app to access details  
> > like first name and last name of the currently logged-in user? I have seen  
> > this line of code which gives me access to the "username" of the currently  
> > logged-in user: _instance('commcaresession')/session/context/username_
> > 
> > Is there something similar to access other user registration details like  
> > we can with the username? Any documentation about such kind of things?
> > 
> > Thanks,  
> > Chaiwa.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Simon Kelly  
> Senior Engineer | Dimagi South Africa
