# Determine if local user is joining the session on onUserJoin

**URL:** <https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809>\
**Category:** iOS\
**Created:** [December 20, 2024, 3:53pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809 "2024-12-20T15:53:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sp.nu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sp.nu/32/49481_2.png) [@sp.nu](https://devforum.zoom.us/u/sp.nu)\
**Post date:** [December 20, 2024, 3:53pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809/1 "2024-12-20T15:53:47Z")

</div>

onUserJoin userArray gives list of all the users. Is there a way to determine if the user who just joined is the local user? In onSessionJoin, getRemoteUser() is always nil although there are already users in the session.

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [December 24, 2024, 2:49pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809/2 "2024-12-24T14:49:15Z")

</div>

Hi @sp.nu,

You can use `client.getCurrentUserInfo().userId`.

```ts
const client = ZoomVideo.createClient();
client.on("user-added", (e)=>{
  const isLocal = e[0].userId === client.getCurrentUserInfo().userId
  
})

```

---

<div class="post-metadata">

**Author:** ![sp.nu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sp.nu/32/49481_2.png) [@sp.nu](https://devforum.zoom.us/u/sp.nu)\
**Post date:** [January 3, 2025, 8:18pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809/3 "2025-01-03T20:18:06Z")

</div>

@ekaansh.zoom : Thank you. I am assuming iOS version works the same way.

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 6, 2025, 1:31pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809/4 "2025-01-06T13:31:02Z")

</div>

Yes, it works the same way.

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 6, 2025, 1:31pm UTC](https://devforum.zoom.us/t/determine-if-local-user-is-joining-the-session-on-onuserjoin/122809/5 "2025-01-06T13:31:16Z")

</div>

Closed on January 6, 2025, 1:31pm UTC


