By decola on
Hi all!
That's a very difficult question!
How can I unlock the "my account" item into the menu administration.
I'd like to remove this item from my menu.
Thanks.
Hi all!
That's a very difficult question!
How can I unlock the "my account" item into the menu administration.
I'd like to remove this item from my menu.
Thanks.
Comments
Y?
Why would you need that? To deny the user the ability to edit their account?
That is the only way for them to change their password, email, username, etc. Denying them that could possibly lock them out should they change email address or forget their password.
To customize the menu.
Me, too: I'd like to customize a menu and show the "My account" link in a "Members only" branch of the menu, not at the top. So I double the question.
People who aren't logged in
People who aren't logged in are not going to see the My Account in the menu. So why would it need to me moved to a member's only section? If they are seeing it, they are a member.
To customize the menu.
As of now, the "My account" menu item sits at menu top. I'd like to move it down the hierarchy so that it only appears in a submenu - and with a different title, too.
I want my users can change
I want my users can change their personal infos via another page that limits their freedom of changes.
So I'd like the 'My account' menu item (and the related page) disappears.
Please, have somebody done that yet?
Edit your user.module
Look for "Your personal page" (line 768 in my installation)
Bracket the following menu item code in comment brackets:
Be sure to include a menu item with the path /user in your menu so that users can access their pages.
I had to edit my menu first before the change became visible. Some caching problems, I assume.
Thanks a lot, Sasha :-)
Thanks a lot, Sasha :-)
Line 780 on Drupal 5 Sascha,
Line 780 on Drupal 5
Sascha, this is not unlocking the menu item, but just hiding it from the menus...
Or did I miss something?
My Account really needs to
My Account really needs to be taken out of Navigation, this makes it next to impossible to create a custom template, I guess I could always do it the hard way and rip the code out with me bare hands arghh
You can always use the Me
You can always use the Me Aliases module to (drupal.org/project/me I think) to create a link to user/me.
I second this!
There's no reason (that I can see) that the My Account link needs to be locked. I would submit this as an issue if I knew where to submit one!? Anybody know where to submit an issue with the user.module?
Civicsolar
http://www.civicsolar.com
=-=
yes:
submit it against drupal in the first drop ddonw, then choose the user.module in the component drop down of the next screen.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
Done
http://drupal.org/node/204297
Civicsolar
http://www.civicsolar.com
This is a dumb question
Which file would "your personal page" refer to?
Where would it be in your installation?
sorry- im sure this is a dumb question.
=-=
personal page, would be your own profile when logged in which can be seen at yoursite.com/user (with clean urls on)
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
Change My Account name!
this may help some one, if you would like to change the name of My account
Look in this code if ($user->uid) {
$items[] = array('path' => 'user/'. $user->uid, 'title' => t('my account'),
'callback' => 'user_view', 'callback arguments' => array(arg(1)), 'access' => TRUE,
'type' => MENU_DYNAMIC_ITEM);
'title' => t('my account'), right there where is says my account just change that to the name you want
I changed mine to My Home and it worked flawlessly :)
Might not this hack cause
Might not this hack cause problems to the locale.module? Would there be a more stable workaround?
In user.module, i put:
In user.module, i put:
// Your personal page
if ($user->uid) {
$items[] = array('path' => 'user/'. $user->uid, 'title' => t($user->name),
'callback' => 'user_view', 'callback arguments' => array(arg(1)), 'access' => TRUE,
'type' => MENU_NORMAL_ITEM);
}
which works great !
Re: Y?
A client of mine wants to have a single login that all their VIP clients use. There is no need in this case to have one account per person. You don't want all these people logging in under one account to be able to go to My account and edit, let's say the password, which in this case is something that many people share. I'm sure others have other scenarios that are just as valid for hiding or unlocking the My account menu item. In my case I only want to hide it from one specific user.
--
Reg | www.AceWebGroup.com
How to change or remove 'My account' without hacking core
Here's a quick way to alter or remove the 'My account' menu item without hacking into the core. It works in 5.6, at least.
The basic idea is to alter the $primary_links array before it's rendered by the theme_links function.
Add the following function to your template.php file. The function illustrates some of the things you can do to 'My account'. You'll want to remove or comment out some of the things it's doing to suit your needs.
You could also do all of the link theming yourself, if you want, instead of calling theme_links at the end. Look at http://api.drupal.org/api/function/theme_links to see how theme_links works.
This works for the Primary
This works for the Primary Links but My account is locked into the Navigation menu.
--
Reg | www.AceWebGroup.com
Possible mistake
This code works really good but I believe there is an extra
&character in it where it says:foreach($links_array as $key => &$link) {should be:
foreach($links_array as $key => $link) {I copied and pasted this code into my template.php and got blank page but then I removed the
&and worked perfect.Y?
Here is another example of why someone would want to remove the ability for users to edit their accounts:
We have our Drupal 5.7 site authenticating to our AD through the LDAP module. We do not want users to be able to change their passwords so we use this module to accomplish that: http://drupal.org/project/noreqnewpass
The problem with that module is that it still gives the user the ability to change their email address which is retrieved from the AD. There is no reason that the user should be able to change their email address since this is done at our Corporate IT. I am still looking for a module to remove the ability for users to change their email address.
Moving (deleting) My account link
The easiest way I have found of moving this link is at http://drupal.org/node/163089. If you create a menu item in any menu you want with the path of "user", the My account link moves there. If you don't want users to be able to change their account, you can create a new menu, add a menu item with the path of "user", then configure the menu block at admin/build/block to be accessible only to certain roles (such as admin). You can also disable the block if you don't want anyone to see it.
This worked
The method at that link worked nicely for me on a 5.10 installation.
Andre'