isIdentified
Check whether the user is identified.
This method checks whether the current session is associated with an identified user.
Best practice
For better readability, use the isAnonymous method instead of a logical negation when checking if the user is anonymous.
Signature
This method has the following signature:
user.isIdentified(): boolean
This method returns true if the user is identified, false otherwise.
Example
Here is a basic example of how to use this method:
import croct from '@croct/plug';if (croct.user.isIdentified()) {console.log('The user is identified');} else {console.log('The user is anonymous');}