<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<section id="uri.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
    <sectioninfo>
	<revhistory>
	    <revision>
		<revnumber>$Revision: 1.3 $</revnumber>
		<date>$Date: 2006/12/11 13:11:02 $</date>
	    </revision>
	</revhistory>
    </sectioninfo>

    <title>Functions</title>

    <section id="is_user">
	<title>
	    <function>is_user(username)</function>
	</title>
	<para>
	    Check if the username in credentials matches the given username.
	</para>
	<para>Meaning of the parameters is as follows:</para>
	<itemizedlist>
	    <listitem>
		<para><emphasis>username</emphasis> - Username string or AVP.
		</para>
	    </listitem>
	</itemizedlist>
	<example>
	    <title><function>is_user</function> usage</title>
	    <programlisting>
...
if (is_user("jan")) {
    ...
};
...
	    </programlisting>
	</example>
    </section>

    <section id="has_totag">
	<title>
	    <function>has_totag()</function>
	</title>
	<para>
	    Check if To header field uri contains tag parameter.
	</para>
	<example>
	    <title><function>has_totag</function> usage</title>
	    <programlisting>
...
if (has_totag()) {
    ...
};
...
	    </programlisting>
	</example>
    </section>
</section>
