Sorry, but how are you getting an error on the lines you specified? The $user = ... line is fine since the get() will return nothing and it will default to the empty hash. And because that always contains something the $reason = ... line is fine.
Adrian
Adrian