0
Follow my login code to the webservice Soap
if (isset($_POST["action"]) && $_POST["action"] == "login") {
$soapClient = new SoapClient(WEST_SOAP_WSDL,
array("trace" => WEST_SOAP_TRACE, "login" => WEST_SOAP_LOGIN, "password" => WEST_SOAP_PASS));
try {
$clienteId = $soapClient->loginAuth($_POST["username"]);
} catch (Exception $e) {
print_r($e);
}
if ($clienteId) {
session_regenerate_id(TRUE);
$_SESSION["auth"]["id"] = $clienteId;
$_SESSION["auth"]["username"] = $_POST["username"];
try {
$_SESSION['cliente'] = serialize($soapClient->getClientDataById($clienteId));
} catch (Exception $e) {
print_r($e);
}
How Could I Restrict Access to My Subscriber Panel in php in the status below ? :
inativo
cancelado
serasa
you would like to restrict when the status is these?
– Marcos Henrique
yes, that’s exactly right
– user22753
its status is set by Soapconnection.call()? for example: 200 => ok; 500=> error server; 305 => inactive?
– Marcos Henrique
not , thus : select name="status" id="status" style="width: auto;" disabled="disabled"> <option value="S"> asset</option> <option value="N"> inactive</option>
– user22753
then it is set in the database, correct?
– Marcos Henrique
correct, in the database
– user22753