It doesn't really matter, but I prefer to do this in the controller. Make your views dumb and only work with variables they get from the controller. If you add a session now you might add other stuff later or more sessions and your views get bloated and unreadable. That's my 2 cents.