coherence icon indicating copy to clipboard operation
coherence copied to clipboard

inconsistent user when using the sign_in_count

Open peillis opened this issue 7 years ago • 0 comments

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.

peillis avatar Aug 09 '17 09:08 peillis