本文整理汇总了PHP中soapclient::ValidateSubscriber方法的典型用法代码示例。如果您正苦于以下问题:PHP soapclient::ValidateSubscriber方法的具体用法?PHP soapclient::ValidateSubscriber怎么用?PHP soapclient::ValidateSubscriber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soapclient
的用法示例。
在下文中一共展示了soapclient::ValidateSubscriber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encrypt_decrypt
foreach ($_COOKIE["etype"] as $name => $value) {
$etyp[$name] = $value;
}
$decrypted_txt = encrypt_decrypt('decrypt', $etyp['perms']);
//$pos = strrpos($decrypted_txt , '_');
// $username = substr($decrypted_txt , 0, $pos);
// $password = substr($decrypted_txt , $pos + 1);
$pos = strrpos($decrypted_txt, '##');
$str1 = substr($decrypted_txt, 0, $pos + 1);
$str2 = substr($decrypted_txt, $pos + 2);
$pos1 = strrpos($str2, '--');
$username = substr($str2, 0, $pos1);
$password = substr($str2, $pos1 + 2);
$param = array('UserName' => "{$username}", 'Password' => "{$password}");
$client = new soapclient('http://etypeservices.com/Service_SubscriberLogin.asmx?WSDL');
$response = $client->ValidateSubscriber($param);
if ($response->ValidateSubscriberResult == 1) {
$query = "select name, uid from users where name='" . $username . "'";
$qu = db_query($query);
$useruid = "";
foreach ($qu as $qu) {
$useruid = $qu->uid;
}
global $user;
$user = user_load($useruid);
drupal_session_regenerate();
}
}
function encrypt_decrypt($action, $string)
{
$output = false;
示例2: getEntitlements
function getEntitlements($params)
{
//$query = $this->getEntitlementsQuery2();
//$entitlements = $this->queryMSSQL('Etype', $query, $params);
//echo "entitlements: ", count($entitlements), " results\n"; print_r($entitlements); echo "\n";
$username = $params['0']['0'];
$Password = $params['0']['1'];
// this result means the username/password did not return a record
$param12 = array('UserName' => "{$username}");
$client12 = new soapclient('http://etypeservices.com/service_GetPublicationIDByUserName.asmx?WSDL');
$response12 = $client12->GetPublicationID($param12);
if ($response12->GetPublicationIDResult == -9) {
$return = $this->buildOutput("KO", "User or password invalid. Please try again");
} else {
if ($response12->GetPublicationIDResult == 1213) {
$param = array('UserName' => "{$username}", 'Password' => "{$Password}");
$client = new soapclient('http://etypeservices.com/Service_SubscriberLogin.asmx?WSDL');
$response = $client->ValidateSubscriber($param);
if ($response->ValidateSubscriberResult == -5) {
$return = $this->buildOutput("KO", "User or password invalid. Please try again");
} elseif ($response->ValidateSubscriberResult == -1) {
$expired = array();
// expired subscriptions
$canView = array();
// active subscriptions
//$pubview =array();
$outputStarter = "<key>output</key><array>";
$outputBody = '';
$outputEnder = "</array>";
$pubview = $response12->GetPublicationIDResult;
$pre = "smr";
$canView[strtolower($pre)] = true;
$return = $this->buildOutput("KO", "Your subscription to San Marcos Record expired . Please contact the Helpdesk to renew your subscription", $canView, $pubview, $pre);
} else {
$expired = array();
// expired subscriptions
$canView = array();
// active subscriptions
//$pubview =array();
$outputStarter = "<key>output</key><array>";
$outputBody = '';
$outputEnder = "</array>";
$pubview = $response12->GetPublicationIDResult;
$query = "select name, uid from users where name='" . $username . "'";
$qu = db_query($query);
$useruid = "";
foreach ($qu as $qu) {
$useruid = $qu->uid;
}
global $user;
$user = user_load($useruid);
drupal_session_regenerate();
$pre = "smr";
$canView[strtolower($pre)] = true;
$return = $this->buildOutput("OK", "Success", $canView, $pubview, $pre);
}
} else {
$return = $this->buildOutput("KO", "User or password invalid. Please try again");
}
}
return $return;
}