uid; // what's the status? $status = flag_friend_determine_friend_status($flag, $user->uid, $content_id); $link_type = ($status == FLAG_FRIEND_APPROVAL) ? 'unflag' : 'unfriend'; if ($this->view->args[0] == $user->uid) { return flag_friend_create_link($link_type, $content_id); } } }