> For the complete documentation index, see [llms.txt](https://muradkarakas.gitbook.io/sodium_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://muradkarakas.gitbook.io/sodium_documentation/language-reference/built-in-triggers/user_session_end-trigger.md).

# "user\_session\_end" trigger

#### Description

&#x20;`user_session_end` trigger has some special feature, Therefore, it must be use in care.

* `user_session_end` trigger function must be in [Controller File](/sodium_documentation/language-reference/program-structure/controller-file.md).
* `user_session_end` trigger is executed in "no session" context. Therefore, built-in functions, variables etc are not valid in that trigger function.
* Only data available is the arguments.

**Declaration**

```
void user_session_end(char reason, char client_ip_address, char client_domain, char client_os_user, char user_session_start_time);
```

#### **Parameters**

&#x20;**`reason`** : holds the information about why the session is ended.\
&#x20;**`client_ip_address`**: not implemented yet\
&#x20;**`client_domain`** : not implemented yet\
&#x20;**`client_os_user`** : not implemented yet\
&#x20;**`user_session_start_time`**: not implemented yet

#### **See also**
