Commit a7a86cd2 authored by Kjartan's avatar Kjartan
Browse files

- Changing permissions on user menus.

parent 8fa7d74d
...@@ -543,15 +543,15 @@ function user_link($type) { ...@@ -543,15 +543,15 @@ function user_link($type) {
global $user; global $user;
if ($type == 'system') { if ($type == 'system') {
$access = $user->uid; if ($user->uid) {
menu('user', t('my account'), $access ? 'user_page' : MENU_DENIED, 8); menu('user', t('my account'), 'user_page', 0);
menu('user/edit', t('edit account'), $access ? 'user_page' : MENU_DENIED, 0); menu('user/edit', t('edit account'), 'user_page', 0);
menu('logout', t('log out'), $access ? 'user_logout' : MENU_DENIED, 10); menu('logout', t('log out'), 'user_logout', 10);
}
if (!$user->uid) { else {
menu('user/login', t('log in'), 'user_page', 0, MENU_HIDE); menu('user', t('user'), 'user_page', 0, MENU_HIDE);
menu('user/password', t('e-mail new password'), 'user_page', 0, MENU_HIDE); menu('user/edit', t('edit account'), MENU_DENIED);
menu('user/register', t('create new account'), 'user_page', 0, MENU_HIDE); menu('logout', t('log out'), MENU_DENIED);
} }
$access = user_access('administer users'); $access = user_access('administer users');
......
...@@ -543,15 +543,15 @@ function user_link($type) { ...@@ -543,15 +543,15 @@ function user_link($type) {
global $user; global $user;
if ($type == 'system') { if ($type == 'system') {
$access = $user->uid; if ($user->uid) {
menu('user', t('my account'), $access ? 'user_page' : MENU_DENIED, 8); menu('user', t('my account'), 'user_page', 0);
menu('user/edit', t('edit account'), $access ? 'user_page' : MENU_DENIED, 0); menu('user/edit', t('edit account'), 'user_page', 0);
menu('logout', t('log out'), $access ? 'user_logout' : MENU_DENIED, 10); menu('logout', t('log out'), 'user_logout', 10);
}
if (!$user->uid) { else {
menu('user/login', t('log in'), 'user_page', 0, MENU_HIDE); menu('user', t('user'), 'user_page', 0, MENU_HIDE);
menu('user/password', t('e-mail new password'), 'user_page', 0, MENU_HIDE); menu('user/edit', t('edit account'), MENU_DENIED);
menu('user/register', t('create new account'), 'user_page', 0, MENU_HIDE); menu('logout', t('log out'), MENU_DENIED);
} }
$access = user_access('administer users'); $access = user_access('administer users');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment