/**
  * Unpin project
  *
  * @param void
  * @return null
  */
 function unpin()
 {
     if ($this->active_project->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if ($this->request->isSubmitted()) {
         $unpin = PinnedProjects::unpinProject($this->active_project, $this->logged_user);
         if ($unpin && !is_error($unpin)) {
             if ($this->request->isAsyncCall()) {
                 die($this->active_project->getPinUrl());
             } else {
                 flash_success("Project ':name' has been removed from list of favorite projects", array('name' => $this->active_project->getName()));
             }
             // if
         } else {
             if ($this->request->isAsyncCall()) {
                 $this->httpError(HTTP_ERR_OPERATION_FAILED);
             } else {
                 flash_error("Failed to remove ':name' project from list of favorite projects", array('name' => $this->active_project->getName()));
             }
             // if
         }
         // if
         $this->redirectToReferer(assemble_url('dashboard'));
     } else {
         $this->httpError(HTTP_ERR_BAD_REQUEST);
     }
     // if
 }