hi,
JsnHelper::getUser() return a current logged user object, so if you are a guest it return emply value.
try to use something like this: JsnHelper::getUser( $this->data->id )
in profile view $this->data->id return a displayed user id.
NOTE: this forum not allow you to upload PHP files, you need archive in ZIP file before upload