예제 #1
0
 public function unfriend()
 {
     $profileID = getIdFromURL();
     $user = UserRepository::getUserByID($profileID);
     checkRequestURL($profileID, $user);
     $myID = UserRepository::getIdByUsername($_SESSION['username']);
     FriendRepository::unfriend($myID, $profileID);
     redirect(Route::get("userProfile")->generate(array("id" => $profileID)));
 }