Check uniqueness

I believe this link explains your issue:

Basically, you could use either of these

let alreadyExists = theUser != null

or

let isUnique = User.by_name(${userData.username}).isEmpty()
1 Like