useDirectusUser


If you are logged in you can access the user everywhere, if you are not logged in undefined is returned.

<script setup>const user = useDirectusUser();const email = user.value.email;</script>