Add missing assert in user model

/to @bajtos @raymondfeng