# updateUserId()

Function that changes the current user session to the new ID specified.

<table><thead><tr><th width="156" align="center">Parameter</th><th width="156.33333333333331" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td align="center"><code>newUserId</code></td><td align="center"><code>string (optional)</code></td><td>New user ID to change to. If not specified, Feathery will generate a new unique ID.</td></tr><tr><td align="center"><code>merge</code></td><td align="center"><code>boolean (optional)</code></td><td>If <code>merge</code> is <code>false</code> or not specified, the user session will be changed. If <code>merge</code> is <code>true</code>, the old and new user sessions will be merged into a single session. This means data like field values and user metrics will also be merged.</td></tr></tbody></table>
