Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
How can I find value from personal profile field - select box?
I have profile filed - select box - sex with options man and woman.
It's name is profile_pohlavie
I want to write in a block for current user his details, but
check_plain($user->profile_pohlavie) or $user->profile_pohlavie does not return any value.
So, how can i find value from select box? it is some array or something?
Thanks
I have two user scenarios where I need to generate login URLs that allow select users to login to their account, bypassing the user/login screens.
Where would I look for how the current first time user login hash gets created? How would you suggest this be altered to allow a user to click on a url (or bookmark in their browser) and get logged in automatically?
Note: I don't want this to work for all my users, only a couple "special" cases.
I am using taxonomy_access to restrict access to certain nodes depending on their access. However I am attempting to retrofit a PHP application into Drupal and I am hoping to find a way to be able to pull access levels through taxonomy_access.
For example I want to add a taxonomy vocab for something like, "Edit calendar items."
I would like to get the current user ID logged in, check if they are given access to properly edit caledar items and then give them access or deny them.
A major decision I'm facing is whether to use Drupal's "public" or "private" file download method. Does anyone have some insights into the pros and cons of each?
In my fairly common use case, most of my generic files (such as images or user-submitted files) could be public, but there are a few files I'd like to keep private (such as proprietary PDF documents or electronic products).
Here are the pros and cons of "private" file access as I see it: