Did you mean to write `user = g.user`?