Skip to main content

useUserProvider

Introduction

The useUserProvider hook provides you with the current logged in user data. It is used at the core of the SDK, to provide the user object.

PropertyTypeDescription
lmChatUsernull | MemberThe current chat user, or null if not available.
lmChatUserMemberStatenumber | nullThe membership state of the chat user, or null.
logoutUser() => voidFunction to log out the current user.
lmChatUserCurrentCommunityCommunity | nullThe current community the user belongs to, or null.
userNotLoadedErrorStatebooleanIndicates whether there was an error loading the user.

Reference

For reference checkout this file