Hello
I wanted to know where I can get the id of the current user logged link,
when I made a right click on the link on the top right, and I inspect the item in the Google Chrome browser, I get the link of this form, without the ID of this link
<a href=“index.php?module=Users&action=EditView&record=fxxxxxxx-9xxx-1xxx-9xxx-2xxxxxxxxxxx”><img src=“index.php?entryPoint=getImage&imageName=cog.png” class=“iconed”> User_1
The userid in the link you provided would be “record=fxxxxxxx-9xxx-1xxx-9xxx-2xxxxxxxxxxx”.
I want to get the id of the fields “a href”, so I can, manipulate thereafter (ie the hidden or make it visible)
Really not sure what you are wanting to do here.
are you wanting to get it in code ?
global $current_user
$current_user->id
Think thats what you want.
I do not want to retrieve the id of the user logged in, but I want to get the id of the link:
USER_1
For example, the id of the “logout” link is (id=“logout_link”)
LOGOUT
so you want to get the ID of the link of the user in the navigation bar ?
yes exactly
So that ID you are looking for would be the current users ID.
so
global $current_user
$id = $current_user->id
that is the ID which this would return.
it does not work for me
is it possible that I add the id of the link, if so, how?
My ultimate goal is to make a type fields dropdownlist visible to the administrator and the controller (user), and hide this field to all other users
This should work.
where are you trying to do this ? can you post the section of code you are using ?
Ian.
it’s good, it worked, thank you