summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-18 15:19:57 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-18 15:19:57 +0000
commitff9e842730ccf251cf8b76401e4df1b1c6edcea2 (patch)
tree2b10ab740305648bee997708b6d651a3816e3545 /includes
parentdf591c8f4032041613192e1b7836725f92ea7b10 (diff)
downloadbrdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.gz
brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.bz2
#330983 by recidive and boombatower: Rename users/users_roles tables to user/user_role for consistency.
Diffstat (limited to 'includes')
-rw-r--r--includes/file.inc2
-rw-r--r--includes/password.inc4
-rw-r--r--includes/session.inc6
3 files changed, 6 insertions, 6 deletions
diff --git a/includes/file.inc b/includes/file.inc
index e0d828de7..878c1789b 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -13,7 +13,7 @@
*
* Fields on the file object:
* - fid - File ID
- * - uid - The {users}.uid of the user who is associated with the file.
+ * - uid - The {user}.uid of the user who is associated with the file.
* - filename - Name of the file with no path components. This may differ from
* the basename of the filepath if the file is renamed to avoid overwriting
* an existing file.
diff --git a/includes/password.inc b/includes/password.inc
index e82842634..667c3ba47 100644
--- a/includes/password.inc
+++ b/includes/password.inc
@@ -195,7 +195,7 @@ function user_hash_password($password, $count_log2 = 0) {
* @param $password
* A plain-text password
* @param $account
- * A user object with at least the fields from the {users} table.
+ * A user object with at least the fields from the {user} table.
*
* @return
* TRUE or FALSE.
@@ -227,7 +227,7 @@ function user_check_password($password, $account) {
* on the fields in $account.
*
* @param $account
- * A user object with at least the fields from the {users} table.
+ * A user object with at least the fields from the {user} table.
*
* @return
* TRUE or FALSE.
diff --git a/includes/session.inc b/includes/session.inc
index aa06db4ca..141af2f8f 100644
--- a/includes/session.inc
+++ b/includes/session.inc
@@ -83,7 +83,7 @@ function _sess_read($key) {
// Otherwise, if the session is still active, we have a record of the
// client's session in the database.
- $user = db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = :sid", array(':sid' => $key))->fetchObject();
+ $user = db_query("SELECT u.*, s.* FROM {user} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = :sid", array(':sid' => $key))->fetchObject();
// We found the client's session record and they are an authenticated user.
if ($user && $user->uid > 0) {
@@ -93,7 +93,7 @@ function _sess_read($key) {
// Add roles element to $user.
$user->roles = array();
$user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';
- $user->roles += db_query("SELECT r.rid, r.name FROM {role} r INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = :uid", array(':uid' => $user->uid))->fetchAllKeyed(0, 1);
+ $user->roles += db_query("SELECT r.rid, r.name FROM {role} r INNER JOIN {user_role} ur ON ur.rid = r.rid WHERE ur.uid = :uid", array(':uid' => $user->uid))->fetchAllKeyed(0, 1);
}
// We didn't find the client's record (session has expired), or they
// are an anonymous user.
@@ -146,7 +146,7 @@ function _sess_write($key, $value) {
// Last access time is updated no more frequently than once every 180 seconds.
// This reduces contention in the users table.
if ($user->uid && REQUEST_TIME - $user->access > variable_get('session_write_interval', 180)) {
- db_update('users')
+ db_update('user')
->fields(array(
'access' => REQUEST_TIME
))