Documentation

FindUserID

bool
FindUserID(
 string tag_name, 
 string tag_value
 string user_name = "",
 string form_name = "form1", 
 string tag_size = "3", 
 string tag_maxlength = "",
 string button_title = "...",
 string tag_class = "typeinput",
 string button_class = "tablebodybutton",
 string search_page = "/bitrix/admin/user_search.php"
);
The function FindUserID emits the code of HTML elements allowing to enter a user ID and obtain details on a user. A button linked to a user search page is also displayed.

Displays several HTML elements allowing to specify a user ID and retrieve user details next to this input field. A button linked to a user search page is also displayed.

Function parameters

ParameterDescription
tag_name Name of the field used to enter a user ID:
<input type="text" name="tag_name" ...>
tag_value Value of the field used to enter a user ID:
<input type="text" value="tag_value" ...>
user_name The ID, login, first and last names of a user which are displayed near the ID entry field when a page loads.

Optional. The default value is "".
form_name Name of the form containing the user ID entry field.

Optional. The default value is "form1".
tag_size Width of the field used to enter a user ID:
<input type="text" size="tag_size" ...>

Optional. The default value is "3".
tag_maxlength Maximum number of symbols in the field used to enter a user ID:
<input type="text" maxlength="tag_maxlength" ...>

Optional. The default value is "" (unlimited).
button_title Title of the button linked to the user search page:
<input type="button" value="button_title" ...>

Optional. The default value is "..." (unlimited).
tag_class CSS class for the field used to enter a user ID:
<input type="input" class="tag_class" ...>

Optional. The default value is "typeinput".
button_class CSS class of the user search page button:
<input type="button" class="button_class" ...>

Optional. The default value is "tablebodybutton".
search_page Path relative to the root to the user search page.
Optional. The default value is "/bitrix/admin/user_search.php" (administrative section).

Examples of use

<form name="form1">
<?
$name = "[<a href=\"/bitrix/admin/user_edit.php?lang=".language_id."&id=".
$USER_ID."\">".$USER_ID."</a>] (".$LOGIN.") ".$NAME;		

echo FindUserID("USER_ID", $USER_ID, $name, 
"form1", "3", "", "...", "inputtext", "inputbodybutton");
?>
</form>


© «Bitrix24», 2001-2024
Up