Problem Pulling ElggData

I'm having a problem pulling ElggData. When I add this to pfc/index.php I get a white screen ...

$params["nickmeta"] = array(
        'Profile' => "<a href='{$user->getURL()}' target='_blank'>" . htmlentities($user->name) . '</a>', 'Username' => htmlentities($user->username)
    );

Also when I try to pull Elgg User Data in another location, I also have a problem. This time on the kick.class.php command. It sends me an e-mail when someone kicks someone but the email leaves out ALL of the elgg data (usernames of people). I don't know what's up with this but I can't re-install it because I've done a couple of mods. Also I can't really post any code here because a friend gave it to me and I'm not supposed to give it out. Just trying to figure out what's up with the Elgg User Data. Please e-mail me if you have any questions that are too big for here. Thanks :)