<?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>
    </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>
