<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.session-module-name" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>session_module_name</refname>
  <refpurpose>Get and/or set the current session module</refpurpose>
 </refnamediv>
 
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type class="union"><type>string</type><type>false</type></type><methodname>session_module_name</methodname>
   <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>module</parameter><initializer>&null;</initializer></methodparam>
  </methodsynopsis>
  <para>
   <function>session_module_name</function> gets the name of the current
   session module, which is also known as
   <link linkend="ini.session.save-handler">session.save_handler</link>.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>module</parameter></term>
     <listitem>
      <para>
       If <parameter>module</parameter> is specified and not &null;, that module will be
       used instead.
       Passing <literal>"user"</literal> to this parameter is forbidden. Instead
       <function>session_set_save_handler</function> has to be called to set a user
       defined session handler.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the name of the current session module, &return.falseforfailure;.
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>8.0.0</entry>
      <entry>
       <parameter>module</parameter> is nullable now.
      </entry>
     </row>
     <row>
      <entry>7.2.0</entry>
      <entry>
       It is now explicitly forbidden to set the module name to
       <literal>"user"</literal>. Formerly, this has been silently ignored.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
