public function getContacts($user, $password, $provider) { if (!$user || !$password) { return false; } if (!isset($this->inviterObj) || !is_object($this->inviterObj)) { $this->inviterObj = new OpenInviter(); } $this->inviterObj->startPlugin($provider); $this->inviterObj->login($user, $password); $contacts = $this->inviterObj->getMyContacts(); $error = $this->inviterObj->getInternalError(); return $contacts; }