/**
  * Adds a candidate.
  * @param integer $userId
  * @param integer $electionId
  * @return mixed
  */
 public function actionAddCandidate($userId, $electionId)
 {
     $candidate = new Candidate();
     $candidate->election_id = $electionId;
     $candidate->user_id = $userId;
     $candidate->save();
     return $this->redirect(['add-candidate-list', 'electionId' => $electionId]);
 }