Well seems to me that this is where you get the error:
PHP Code:
$this->usercp->add($profileLink);
If so, you have uninitialized property $usercp for your class, or this property does not exist(a typo, or it never exists in the first place). You need to provide more information here, maybe posting the entire class file will do.