tridentli / pitchfork

Golang framework for secure communication platforms.
Apache License 2.0
5 stars 3 forks source link

Cleanly implement User_new / existence checks #127

Open massar opened 7 years ago

massar commented 7 years ago

Currently we check with user.fetch() to see if a user exists; but that might mean that if the user trying to fetch the username cannot see that user, they will also receive an error.

Thus instead of user.fetch() add a new usernameExists() function that does not verify membership, approval status or anything else, but just checks if the user is in the member table.

This is related to this "fix" which was in the end wrong likely due to above confusion: https://github.com/tridentli/pitchfork/commit/ec6de2d8a9a0809878b8e5e41d66ced5623fca51#diff-6ad5280413f793ad8fb1bb64ba56c253