public function execute(&$value, &$error) { $password_field = $this->getParameterHolder()->get('password_field'); $password = $this->getContext()->getRequest()->getParameter($password_field); $update = false; $update_field = $this->getParameterHolder()->get('update_field'); $update = $this->getContext()->getRequest()->getParameter($update_field); $username = $value; // It's a valid account if the password is set to the standard null if ($password == sfConfig::get('app_profile_null_password')) { return true; } $twitter = new TwitterService($username, $password); if ($twitter->simpleVerifyCredentials() == true) { return true; } $error = $this->getParameterHolder()->get('twitter_error'); return false; }