$key, "status" => 1)); return $user->session ? $user->session : ''; } function sess_write($key, $value) { global $HTTP_SERVER_VARS; db_query("UPDATE users SET hostname = '". check_input($HTTP_SERVER_VARS["REMOTE_ADDR"]) ."', session = '". check_query($value) ."', timestamp = '". time() ."' WHERE sid = '$key'"); return ''; } function sess_destroy($key) { global $HTTP_SERVER_VARS; db_query("UPDATE users SET hostname = '". check_input($HTTP_SERVER_VARS["REMOTE_ADDR"]) ."', timestamp = '". time() ."', sid = '' WHERE sid = '$key'"); } function sess_gc($lifetime) { return 1; } /*** Common functions ******************************************************/ function user_external_load($authname) { $arr_uid = db_query("SELECT uid FROM authmap WHERE authname = '$authname'"); if (db_fetch_object($arr_uid)) { $uid = db_result($arr_uid); return user_load(array("uid" => $uid)); } else { return 0; } } function user_load($array = array()) { /* ** Dynamically compose a SQL query: */ $query = ""; foreach ($array as $key => $value) { if ($key == "pass") { $query .= "u.$key = '". md5($value) ."' AND "; } else { $query .= "u.$key = '". addslashes($value) ."' AND "; } } $result = db_query("SELECT u.*, r.perm FROM users u LEFT JOIN role r ON u.role = r.name WHERE $query u.status < 3 LIMIT 1"); $user = db_fetch_object($result); if ($data = unserialize($user->data)) { foreach ($data as $key => $value) { if (!isset($user->$key)) { $user->$key = $value; } } } return $user; } function user_save($account, $array = array()) { /* ** Dynamically compose a SQL query: */ if ($account->uid) { $data = unserialize(db_result(db_query("SELECT data FROM users WHERE uid = '$account->uid'"))); foreach ($array as $key => $value) { if ($key == "pass") { $query .= "$key = '". md5($value) ."', "; } else if (substr($key, 0, 4) !== "auth") { if (in_array($key, user_fields())) { $query .= "$key = '". check_query($value) ."', "; } else { $data[$key] = $value; } } } $query .= "data = '". check_query(serialize($data)) ."', "; db_query("UPDATE users SET $query timestamp = '". time() ."' WHERE uid = '$account->uid'"); $user = user_load(array("uid" => $account->uid)); } else { $array["timestamp"] = time(); foreach ($array as $key => $value) { if ($key == "pass") { $fields[] = check_query($key); $values[] = "'". md5($value) ."'"; } else if (substr($key, 0, 4) !== "auth") { if (in_array($key, user_fields())) { $fields[] = check_query($key); $values[] = "'". check_query($value) ."'"; } else { $data[$key] = $value; } } } $fields[] = "data"; $values[] = "'". serialize($data) ."'"; db_query("INSERT INTO users (". implode(", ", $fields) .") VALUES (". implode(", ", $values) .")"); $user = user_load(array("name" => $array["name"])); } foreach ($array as $key => $value) { if (substr($key, 0, 4) == "auth") { $authmaps[$key] = $value; } } if ($authmaps) { $result = user_set_authmaps($user, $authmaps); } return $user; } function user_set($account, $key, $value) { $account->data[$key] = $value; return $account; } function user_get($account, $key) { return $account->data[$key]; } function user_validate_name($name) { /* ** Verify the syntax of the given name: */ if (!$name) return t("You must enter a Username."); if (ereg("^ ", $name)) return t("The Username cannot begin with a space."); if (ereg(" \$", $name)) return t("The Username cannot end with a space."); if (ereg(" ", $name)) return t("The Username cannot contain multiple spaces in a row."); // if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character."); if (!eregi('^[a-z0-9]+(@[a-z0-9]+)?$', $name)) return t("The name contains an illegal character."); if (strlen($name) > 56) return t("The Username '$name' is too long: it must be less than 56 characters."); } function user_validate_mail($mail) { /* ** Verify the syntax of the given e-mail address. Empty e-mail addresses ** allowed. */ if ($mail && !eregi("^[_+\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $mail)) { return t("The e-mail address '$mail' is not valid."); } } function user_validate_authmaps($account, $edit) { foreach (module_list() as $module) { if (module_hook($module, "auth")) { $result = db_query("SELECT COUNT(*) from authmap WHERE uid != '$account->uid' && authname = '". $edit["authname_$module"] . "'"); if (db_result($result) > 0) { $info = module_invoke($module, "info"); return sprintf(t("The %s ID %s is already taken."), ucfirst($info["name"]), "". $edit["authname_$module"] .""); } } } } function user_password($min_length = 6) { /* ** Generate a human-readable password: */ mt_srand((double)microtime() * 1000000); $words = explode(",", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo")); while (strlen($password) < $min_length) $password .= trim($words[mt_rand(0, count($words))]); return $password; } function user_access($string) { global $user; static $perm; /* ** To reduce the number of SQL queries, we cache the user's permissions ** in a static variable. */ if (!$perm) { if ($user->uid) { $perm = db_result(db_query("SELECT perm FROM role WHERE name = '$user->role'"), 0); } else { $perm = db_result(db_query("SELECT perm FROM role WHERE name = 'anonymous user'"), 0); } } if ($user->uid == 1) { return 1; } else { return strstr($perm, $string); } } function user_mail($mail, $subject, $message, $header) { // print "
subject: $subject"; if (variable_get("smtp_library", "") && file_exists(variable_get("smtp_library", ""))) { include_once variable_get("smtp_library", ""); return user_mail_wrapper($mail, $subject, $message, $header); } else { return mail($mail, $subject, $message, $header); } } function user_deny($type, $mask) { $allow = db_fetch_object(db_query("SELECT * FROM access WHERE status = '1' AND type = '$type' AND LOWER('$mask') LIKE LOWER(mask)")); $deny = db_fetch_object(db_query("SELECT * FROM access WHERE status = '0' AND type = '$type' AND LOWER('$mask') LIKE LOWER(mask)")); if ($deny && !$allow) { return 1; } else { return 0; } } function user_fields() { static $fields; if (!$fields) { // is this ANSI? perhaps this should go in the database include... $result = db_query("SHOW FIELDS FROM users"); while ($data = db_fetch_object($result)) { $fields[] = $data->Field; } } return $fields; } /*** Module hooks **********************************************************/ function user_help() { ?>
header: $header
$message
Drupal offers a powerful and open user system. This system allows users to register, login, logout, maintain user profiles, etc. No participant can use his own name to post comments until he signs up and submits his e-mail address. Those who do not register may participate as anonymous users, but they will suffer numerous disadvantages, for example their posts beginning at a lower score.
In contrast, those with a user account can use their own name or handle and are granted various privileges: the most important are probably the ability to moderate new submissions, to rate comments, and to fine-tune the site to their personal liking. Drupal themes make fine tuning quite a pleasure.
Registered users need to authenticate by supplying a username and password. Users may authenticate locally or via an external authentication source like Jabber, Delphi, and other Drupal web sites. See Distributed Authentication for more information on this innovative feature. The username and password are kept in your database, where the password is hashed so that no one can read nor use it. When a username and password needs to be checked the system goes down the list of registered users until it finds a matching username, and then hashes the password that was supplied and compares it to the listed value. If the hashes match, the username and password are correct. Once a user authenticated session is started, and until that session is over, the user won't have to re-authenticate. To keep track of the individual sessions, Drupal relies on PHP's session support. A visitor accessing your web site is assigned an unique ID, the so-called session ID, which is stored in a cookie. For security's sake, the cookie does not contain personal information but acts as a key to retrieve the information stored on your server's side. When a visitor accesses your site, Drupal will check whether a specific session ID has been sent with the request. If this is the case, the prior saved environment is recreated.
Authenticated users can select entirely different appearances for the site,
utilizing their own preferences for how the pages are structured, how navigation
lists and other page components are presented and much more.
Administrators manage user accounts by clicking on the User Management link in their Admin interface. There, you will find several configuration pages and reports which help you manage your users. The following pages are available:
If your site blocks is completely private, and doesn't allow registration for any old web user (see Settings for this feature), then you'll need to add new users manually. This web page allows any administrator to register a new user.
Access rules enable administrators to filter out usernames and e-mail addresses which are not allowed in Drupal. An administrator creates a 'mask' against which each new registration is checked. Disallowed names and e-mail addresses are denied access to the site. Another handy use for this page is to disallow registration to your site from an untrusted external authentication server. Just add their server address to the username mask section and you've effectively blocked all logins from that server.
To do describe access rules you can use the following wild-card characters:
Examples:
%@hotmail.com
, %@altavista.%
, %@usa.net
, etc. Used to prevent users from using free e-mail accounts, which might be used to cause trouble.root
, webmaster
, admin%
, etc. Used to prevent administrator impersonators.If no access rules are provided, access control is turned off and everybody will be able to access your website. The 'allow' rules are processed prior to the 'deny' rules and are thus considered to be stronger.
This page is quite powerful. It allows an administrator to review any user's profile. In addition, administrators may block any user, or assign him a role, using this page.
Roles allow you to fine tune the security and administration of drupal. A role defines a group of users which have certain privileges. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. By default, Drupal comes with two commonly used roles:
These common roles will suffice for most sites. However, for a more complex site where you need to give several users different access privileges, you will need to add a new role by clicking the "add new role" link. Then define what privileges that role will have by clicking the "permission overview" link and checking the appropriate boxes to give that role the permissions you desire.
To attach a specific user to a role, use the "account" section of the drupal Administration.
Note: If you intend for a user to access certain sections of the administration pages, they must have "access administration page" privileges.
Each role has certain things that its users are allowed to do, and some that are disallowed. For example, authenticated users may usually post a story but Anonymous users may not.
Each permission describes a fine-grained logical operation such as
access administration pages or add and modify user
accounts. You
could say a permission represents access granted to a user to perform a set
of
operations.
Search Account enables an admin to query for any username in the user table and return users which match that query. For example, one may search for 'br' and Drupal might return 'brian', 'brad', and 'brenda'.
Administrators may choose to restrict registration to their site. That restriction may be accomplished on this page. Also, the list of words which may be included in a system generated password is also listed on this page. Drupal generates passwords by joining small words from the password list until the new password is greater than 6 characters.
All users sorted by most recent login.
All users sorted by most recent registration
All users who have been blocked (status = 0) sorted by most recent registration
All users with a role other than Authenticated User
One of the more tedious moments in visiting a new web site is filling out the registration form. The reg form provides helpful information to the web site owner, but not much value for the user. The value for the end user is usually a the ability to post a messages or receive personalized news, etc. Distributed authentication (DA) gives the user what he wants without having to fill out the reg form. Removing this obstacle yields more registered and active users for the web site.
DA enables a new user to input a username and password into the login box and immediately be recognized, even if that user never registered on your site. This works because Drupal knows how to communicate with external registration databases. For example, lets say that your new user 'Joe' is already a registered member of Delphi Forums. If your Drupal has delphi.module installed, then Drupal will inform Joe on the registration and login screens that he may login with his Delphi ID instead of registering with your Drupal instance. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then communicates with remote.delphiforums.com (usually using XML-RPC, HTTP POST, or SOAP) behind the scenes and asks "is this password for username=joe? If Delphi replies yes, then Drupal will create a new local account for joe and log joe into it. Joe may keep on logging into your Drupal instance in the same manner, and he will be logged into the same joe@remote.delphiforums.com account.
One key element of DA is the 'authmap' table, which maps a user's authname (e.g. joe@remote.delphiforums.com) to his local UID (i.e. universal identification number). This map is checked whenever a user successfully logs into an external authentication source. Once Drupal knows that the current user is definately joe@remote.delphiforums.com (because Delphi says so), he looks up Joe's UID and logs Joe into that account.
Drupal is setup so that it is very easy to add support for any external authentication source. See the Drupal Handbook for information on authoring authentication modules. You currently have the following authentication modules installed ...
foreach (module_list() as $module) { if (module_hook($module, "auth")) { print "Coming soonish.
} function user_perm() { return array("administer users"); } function user_search($keys) { global $PHP_SELF; $result = db_query("SELECT * FROM users WHERE name LIKE '%$keys%' LIMIT 20"); while ($account = db_fetch_object($result)) { $find[$i++] = array("title" => $account->name, "link" => (strstr($PHP_SELF, "admin.php") ? "admin.php?mod=user&op=edit&id=$account->uid" : "module.php?mod=user&op=view&id=$account->uid"), "user" => $account->name); } return $find; } function user_block() { global $user; if ($user->uid) { // Display account settings: $block[0]["subject"] = $user->name; $output .= "One of the more tedious moments in visiting a new web site is filling out the registration form. Here at %s, you do not have to fill out a registration form if you are already a member of "; $output .= implode(", ", user_auth_help_links()); $output .= ". This capability is called Distributed Authentication, and is unique to Drupal, the software which powers %s.
Distributed Authentication enables a new user to input a username and password into the login box, and immediately be recognized, even if that user never registered at %s. This works because Drupal knows how to communicate with external registration databases. For example, lets say that new user 'Joe' is already a registered member of Delphi Forums. Drupal informs Joe on registration and login screens that he may login with his Delphi ID instead of registering with %s. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then contacts the remote.delphiforums.com server behind the scenes (usually using XML-RPC, HTTP POST, or SOAP) and asks: \"Is the password for user Joe correct?\". If Delphi replies yes, then we create a new $site account for Joe and log him into it. Joe may keep on logging into %s in the same manner, and he will always be logged into the same account.
"; $output = sprintf(t($output), $site, $site, $site, $site, $site, $site); foreach (module_list() as $module) { if (module_hook($module, "auth")) { $output .= "". check_output($error) ."
"; } /* ** Display login form: */ $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, sprintf(t("Enter your %s username, or an ID from one of our affiliates: %s."), variable_get("site_name", "local"), implode(", ", user_auth_help_links()))); $output .= form_password(t("Password"), "pass", $pass, 20, 64, t("Enter the password that accompanies your username.")); $output .= form_submit(t("Log in")); return form($output); } function user_logout() { global $user; if ($user->uid) { watchdog("user", "session closed for user '$user->name'"); /* ** Destroy the current session: */ session_destroy(); unset($user); } /* ** Redirect the user to his personal information page: */ drupal_goto("index.php"); } function user_pass($edit = array()) { if ($edit["name"]) { $account = db_fetch_object(db_query("SELECT uid FROM users WHERE name = '". check_input($edit["name"]) . "'")); if (!$account) $error = sprintf(t("Sorry. The username %s is not recognized."), $edit["name"]); } else if ($edit["mail"]) { $account = db_fetch_object(db_query("SELECT uid FROM users WHERE mail = '". check_input($edit["mail"]) ."'")); if (!$account) $error = sprintf(t("Sorry. The e-mail address %s is not recognized."), $edit["mail"]); } if ($account) { $from = variable_get("site_mail", ini_get("sendmail_from")); $pass = user_password(); /* ** Save new password: */ user_save($account, array("pass" => $pass)); /* ** Mail new password: */ user_mail($edit["mail"], t("user account details"), sprintf(t("%s,\n\nyou requested us to e-mail you a new password for your account at %s. You can now login using the following username and password:\n\n username: %s\n password: %s\n\n\n-- %s team"), $edit["name"], variable_get("site_name", "drupal"), $edit["name"], $pass, variable_get("site_name", "drupal")), "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from"); watchdog("user", "mail password: '". $edit["name"] ."' <". $edit["mail"] .">"); return t("Your password and further instructions have been sent to your e-mail address."); } else { // Display error message if necessary. if ($error) { $output .= "". check_output($error) ."
"; } /* ** Display form: */ $output .= sprintf(t("%sEnter your username %sor%s your email address.%s"), "", "", "", "
"); $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64); $output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64); $output .= form_submit(t("E-mail new password")); return form($output); } } function user_register($edit = array()) { if ($edit["name"] && $edit["mail"]) { if ($error = user_validate_name($edit["name"])) { // do nothing } else if ($error = user_validate_mail($edit["mail"])) { // do nothing } else if (user_deny("user", $edit["name"])) { $error = sprintf(t("The name '%s' has been denied access."), $edit["name"]); } else if (user_deny("mail", $edit["mail"])) { $error = sprintf(t("The e-mail address '%s' has been denied access."), $edit["mail"]); } else if (db_num_rows(db_query("SELECT name FROM users WHERE LOWER(name) = LOWER('". $edit["name"] ."')")) > 0) { $error = sprintf(t("The name '%s' is already taken."), $edit["name"]); } else if (db_num_rows(db_query("SELECT mail FROM users WHERE LOWER(mail) = LOWER('". $edit["mail"] ."')")) > 0) { $error = sprintf(t("The e-mail address '%s' is already taken."), $edit["mail"]); } else if (variable_get("user_register", 1) == 0) { $error = t("Public registrations have been disabled by the site administrator."); } else { foreach (module_list() as $module) { if (module_hook($module, "user")) { $result = module_invoke($module, "user", "register_validate", $edit, $user); if (is_array($result)) { $data = array_merge($data, $result); } elseif (is_string($result)) { $error = $result; break; } } } if (!$error) { $success = 1; } } } if ($success) { watchdog("user", "new user: '". $edit["name"] ."' <". $edit["mail"] .">"); $from = variable_get("site_mail", ini_get("sendmail_from")); $pass = user_password(); if (variable_get("user_register", 1) == 1) { /* ** Create new user account, no administrator approval required: */ user_save("", array_merge(array("name" => $edit["name"], "pass" => $pass, "init" => $edit["mail"], "mail" => $edit["mail"], "role" => "authenticated user", "status" => 1), $data)); user_mail($edit["mail"], t("user account details"), sprintf(t("%s,\n\nsomoneone signed up for a user account on %s and supplied this e-mail address as their contact. If it wasn't you, just ignore this mail but if it was you, you can now login using the following username and password:\n\n username: %s\n password: %s\n\n\n-- %s team"), $edit["name"], variable_get("site_name", "drupal"), $edit["name"], $pass, variable_get("site_name", "drupal")), "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from"); } else { /* ** Create new user account, administrator approval required: */ user_save("", array_merge(array("name" => $edit["name"], "pass" => $pass, "init" => $edit["mail"], "mail" => $edit["mail"], "role" => "authenticated user", "status" => 0), $data)); user_mail($edit["mail"], t("user account details"), sprintf(t("%s,\n\nsomoneone signed up for a user account on %s and supplied this e-mail address as their contact. If it wasn't you, just ignore this mail but if it was you, you can login as soon a site administrator approved your request using the following username and password:\n\n username: %s\n password: %s\n\n\n-- %s team"), $edit["name"], variable_get("site_name", "drupal"), $edit["name"], $pass, variable_get("site_name", "drupal")), "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from"); } return t("Your password and further instructions have been sent to your e-mail address."); } else { if ($error) { $output .= "". check_output($error) ."
"; } $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64, t("Your full name or your prefered username: only letters, numbers and spaces are allowed.")); $output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64, t("Your e-mail address: a password and instructions will be sent to this e-mail address so make sure it is accurate.")); foreach (module_list() as $module) { if (module_hook($module, "user")) { $output .= module_invoke($module, "user", "register_form", $edit, $user); } } $output .= form_submit(t("Create new account")); return form($output); } } function user_delete() { global $edit, $user; if ($edit["confirm"]) { watchdog(user,"$user->name deactivated her own account."); db_query("UPDATE users SET mail = 'deleted', status='0' WHERE uid = '$user->uid'"); $output .= t("Your account has been deactivated."); } else { $output .= form_item(t("Confirm Deletion"), t("You are about to deactivate your own user account. In addition, your email address will be removed from the database.")); $output .= form_hidden("confirm", 1); $output .= form_submit(t("Delete account")); $output = form($output); } return $output; } function user_edit($edit = array()) { global $HTTP_HOST, $themes, $user, $languages; if ($user->uid) { if ($edit["name"]) { if ($error = user_validate_name($edit["name"])) { // do nothing } else if ($error = user_validate_mail($edit["mail"])) { // do nothing } else if (db_num_rows(db_query("SELECT uid FROM users WHERE uid != '$user->uid' AND LOWER(name) = LOWER('". $edit["name"] ."')")) > 0) { $error = sprintf(t("The name '%s' is already taken."), $edit["name"]); } else if ($edit["mail"] && db_num_rows(db_query("SELECT uid FROM users WHERE uid != '$user->uid' AND LOWER(mail) = LOWER('". $edit["mail"] ."')")) > 0) { $error = sprintf(t("The e-mail address '%s' is already taken."), $edit["mail"]); } else if ($error = user_validate_authmaps($user, $edit)) { // do nothing } else if ($user->uid) { foreach (module_list() as $module) { if (module_hook($module, "user")) { $result = module_invoke($module, "user", "edit_validate", $edit, $user); } if (is_array($result)) { $data = array_merge($data, $result); } elseif (is_string($result)) { $error = $result; break; } } /* ** If required, check that proposed passwords match. If so, ** add new password to $edit. */ if ($edit["pass1"]) { if ($edit["pass1"] == $edit["pass2"]) { $edit["pass"] = $edit["pass1"]; } else { $error = t("The specified passwords do not match."); } } unset($edit["pass1"], $edit["pass2"]); if (!$error) { /* ** Save user information: */ $user = user_save($user, array_merge($edit, $data)); $output .= sprintf(t("Your user information changes have been saved."), "", "
"); } } } if ($error) { $output .= "". check_output($error) ."
"; } $output .= form_textfield(t("Username"), "name", $user->name, 30, 55, t("Your full name or your prefered username: only letters, numbers and spaces are allowed.")); $output .= form_textfield(t("E-mail address"), "mail", $user->mail, 30, 55, t("Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.")); $result = user_get_authmaps($user); foreach (module_list() as $module) { if ($module != "drupal" && module_hook($module, "auth")) { $output .= form_textfield(module_invoke($module, "info", "name") . " ID", "authname_" . $module, $result[$module], 30, 55, sprintf(t("You may login to %s using a valid %s."), variable_get("site_name", "this web site"), "". module_invoke($module, "info", "name") ." ID", "")); } } foreach (module_list() as $module) { if (module_hook($module, "user")) { $output .= module_invoke($module, "user", "edit_form", $edit, $user); } } $output .= form_textfield(t("Homepage"), "homepage", $user->homepage, 30, 55, t("Optional") .". ". t("Make sure you enter a fully qualified URL: remember to include \"http://\".")); foreach ($themes as $key => $value) $options .= "\n"; $output .= form_item(t("Theme"), "", t("Selecting a different theme will change the look and feel of the site.")); for ($zone = -43200; $zone <= 46800; $zone += 3600) $zones[$zone] = date("l, F dS, Y - h:i A", time() - date("Z") + $zone) ." (GMT ". $zone / 3600 .")"; $output .= form_select(t("Timezone"), "timezone", $user->timezone, $zones, t("Select what time you currently have and your timezone settings will be set appropriate.")); $output .= form_select(t("Language"), "language", $user->language, $languages, t("Selecting a different language will change the language of the site.")); $output .= form_textarea(t("Signature"), "signature", $user->signature, 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."". check_output($error) ."
"; } $output .= form_textfield("Username", "name", $edit["name"], 30, 55); $output .= form_textfield("E-mail address", "mail", $edit["mail"], 30, 55); $output .= form_textfield("Password", "pass", $edit["pass"], 30, 55); $output .= form_submit("Create account"); return form($output); } } function user_admin_access($edit = array()) { global $op, $id, $type; $output .= "e-mail rules :: username rulestype | mask | operations |
---|---|---|
allow | ". check_output($rule->mask) ." | aid\">delete rule |
deny | ". check_output($rule->mask) ." | aid\">delete rule |
%: matches any number of characters, even zero characters.
_: matches exactly one character.
". implode(" | ", array_keys($roles)) ." | |
---|---|---|
". check_output($perm) ." | "; foreach ($roles as $name => $value) { $output .= ""; } $output .= " |
name | operations |
---|---|
". check_output($role->name) ." | rid\">edit role |
username | last access | operations |
---|---|---|
". format_name($account) ." | ". format_date($account->timestamp, "small") ." | uid\">edit account |