<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hi Tito,<br>
<br>
you can do :<br>
<br>
switch ( www_authorize(...) ) {<br>
case 1 :<br>
# success<br>
break;<br>
case -1:<br>
break;<br>
case -2:<br>
# wrong passwd<br>
break;<br>
default:<br>
....<br>
}<br>
<br>
<br>
or if you want to actually print the ret code :<br>
<br>
</tt><tt>$var(rc) = www_authorize(...)</tt><tt>;</tt><tt><br>
</tt><tt>xlog("Return code is </tt><tt><tt>$var(rc) </tt>\n")</tt><tt><br>
</tt><tt><br>
</tt><tt>switch ( </tt><tt><tt>$var(rc) ) {<br>
case 1 :<br>
# success<br>
break;<br>
case -1:<br>
break;<br>
case -2:<br>
# wrong passwd<br>
break;<br>
default:<br>
....<br>
}<br>
<br>
Regards,<br>
</tt></tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 28.05.2014 07:45, Tito Cumpen wrote:<br>
</div>
<blockquote
cite="mid:CANZPVB7a-cJeuG4PwX6DybYn2gw2q18OFfGjQbKXb6w1dsWZ2Q@mail.gmail.com"
type="cite">
<div dir="ltr">Group,
<div><br>
</div>
<div><br>
</div>
<div>I am looking for the ability to deal with return code -2 in
a switch statement with the intent to trigger a reply
specifying that the password is incorrect during registration.
Can anyone provide examples? I have tried including my case
statement within www_authorize but have not been able to
trigger the return code.</div>
<div><br>
</div>
<div><br>
Thanks,</div>
<div>Tito</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>