coherence
coherence copied to clipboard
inconsistent user when using the sign_in_count
Suppose an user which has sign_in_count=1 in the database. The moment she logins again, the database will have sign_in_count=2, but the conn.assigns.current_user has sign_in_count=1 This leads to the problem that conn.assigns.current_user != Repo.get!(User, n) which causes a lot of troubles, because I can't use the current_user instead I have to check the user id for example.