Is that even possible? I have the following code, but it's failing at the if statement. I did a print_r($p) to find out what it was outputting, and all it was giving up was a "1". Hmm???? And yes, I checked the database to make sure everything existed.
BTW, the class Profile is an extension of Page.
public function EditProfileLink() {
$mid = Member::currentUserID();
if($p = DataObject::get_one("Profile", "MemberID = $mid")) {
return $p->Link('edit');
} else
return false;
}