summaryrefslogtreecommitdiff
path: root/includes/user.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-03-31 14:58:37 +0000
committerDries Buytaert <dries@buytaert.net>2001-03-31 14:58:37 +0000
commitd1a07a2e8f21e402c85799215f37bd7f3cb685f1 (patch)
tree845bccd135828c5c39584bde0d199dff941b8180 /includes/user.inc
parentd9e72f37de62ae2c96925ec5f75c7e6bd449b59b (diff)
downloadbrdo-d1a07a2e8f21e402c85799215f37bd7f3cb685f1.tar.gz
brdo-d1a07a2e8f21e402c85799215f37bd7f3cb685f1.tar.bz2
- fixed "you-have-to-logout-and-login-before-permissions-change" bug
(reported by UnConeD) - added "add node" link to book selection box and made it display the current location - removed tabs and whitespaces from themes - done automatically
Diffstat (limited to 'includes/user.inc')
-rw-r--r--includes/user.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/user.inc b/includes/user.inc
index ce5820023..66a015e4f 100644
--- a/includes/user.inc
+++ b/includes/user.inc
@@ -29,6 +29,14 @@ function user_load($username) {
return new User($username);
}
+function user_rehash() {
+ global $user;
+ if ($user->id) {
+ $user = new User($user->userid);
+ session_register("user");
+ }
+}
+
function user_save($account, $array) {
// dynamically compose query:
foreach ($array as $key=>$value) {
@@ -82,7 +90,7 @@ function user_set($account, $column, $name, $value) {
}
function user_access($account, $section = 0) {
-// print $account->userid ." ". $account->access ."<P>";
+ global $user;
if ($section) return (user_get($account, "access", $section) || $account->id == 1);
else return ($account->access || $account->id == 1);
}