AuthForm
CMain::AuthForm( mixed mess, bool show_prolog = true, bool show_epilog = true, string not_show_links = "N", bool do_die = true )
The method includes components depending on the parameters passed in the URL:
Parameter | Value | Component name |
---|---|---|
forgot_password | yes | Lost password retrieval (system.auth.forgotpasswd) |
change_password | yes | (Lost password change (system.auth.changepasswd) |
register | yes | Registration form (system.auth.registration) |
authorize_registration | yes | Authorization and registration form (system.auth.authorize) |
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.
Non-static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
mess | String containing the error message, or array in the format Array("MESSAGE" => message, "TYPE" => "ERROR"|"OK") (processed in the ShowMessage function) | |
show_prolog | If true, the method emits the prologue code (top part of a page). If set to false, the prolog is not emitted. | |
show_epilog | If true, the method emits the epilogue code (bottom part of a page). If set to false, the epilog 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). | |
do_die | If true, the page will be completed after the form is displayed and (optionally) epilog as well. If set to false - page will not be interrupted. |
See Also
Examples of use
<? // 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."); ?>
© «Bitrix24», 2001-2024