Bitrix Site Manager

CMain::AuthForm

CMain::AuthForm(
 mixed message,
 bool show_header = true,
 bool show_footer = true,
 string not_show_links = "N"
)

The method AuthForm includes components depending on the parameters passed in the URL.
Parameter Value Component Path to component
forgot_password yes Lost password retrieval main/auth/forgot_password.php
change_password yes Lost password change main/auth/change_password.php
register yes Registration form main/auth/registration.php
authorize_registration yes Authorization and registration form main/auth/authorize_registration.php

If neither of the parameters are specified, the method includes the Authorization form component (main/auth/authorize.php).

Note
The method stops the execution of the current page after the inclusion of the required component.

Parameters

ParameterDescription
message String containing the error message, or array in the format Array("MESSAGE" => message, "TYPE" => "ERROR"|"OK") (processed in the ShowMessage function)
show_header If true, the method emits the prologue code (top part of a page). If set to false, the prolog is not emitted.
show_footer If true, the method emits the epilogue code (bottom part of a page). If set to false, the prolog is not emitted.
not_show_links This parameter is passed to the component Authorization form (main/auth/authorize.php). If set to Y, the links to register, retrieve or change the forgotten password are not displayed. If set to N,  the links are displayed (the default behaviour).

See Also

Example



<?
// get read access permission for the file 
// "/download/document.doc" for the current user
$FILE_PERM = $APPLICATION->GetFileAccessPermission("/download/document.doc");
$FILE_PERM = (strlen($FILE_PERM)>0 ? $FILE_PERM : "D");
// display the auth. form is read access is denied
if($FILE_PERM<"R") $APPLICATION->AuthForm("Cannot access this file.");
?>