How to access user information with php?

Hi, I am new to the forum and Drupal.

I am building a website, and it's mostly straight forward, but I am stuck at customizing user profile page. I don't know how to access user information from this array. I am editing user-profile.tpl.php, and by following tutorial on customizing this page, I have added few lines of code so I can access $user_profile array.

Thing is, I have this new custom field "field_genre_01", and now this array is confusing me totally. Why is my new filed appearing in two places? .

How can I get user name, email, or for example user_picture markup from php in few lines of code??

Thanks!

Array
(
[user_picture] => Array
(
[#markup] =>

Only local images are allowed.

[#weight] => -10
)

[field_genre_01] => Array
(
[#theme] => field
[#weight] => 0
[#title] => genre
[#access] => 1
[#label_display] => above
[#view_mode] => full
[#language] => und
[#field_name] => field_genre_01

undefined ___ error

what causes the Undefind xxx errors?

how can we rectify them. while they don't seem to do anything, i'd like to fix it so it stops showing up. for me, i started seeing it after setting up Video, but I recently saw someone in the Ubercart forums talking about the same "Undefined index" error.

want collapse all modules in module admin page

is there a way so that by default, when i view my "modules," page via administrartion, all of the tabs are automatically collapsed?

it kind of slows down my system having them all opened up at once. plus, it's just a little ugly. if i could have them all collapsed by default that would be great.

even better would be to collapse only installed/active modules, so that when new mods are added they are found that much faster. i frequently CTRL-F to find what new mods i am looking for faster.

Can't delete user

I created a test user and I can't delete it. More specifically, I got access denied at /batch?op=start&id=95. Can any one help, thanks in advance.

Is there a way to have custom javascript decide which events trigger ajax on forms?

Hi,

In a textfield/textarea on a form, I need ajax to be triggered by a keydown or keypress event, but not just the Enter key; I'd like the event handler to call my function that then decides whether ajax gets triggered. As far as I can tell, there is no provision for this in core. Is there an existing module that assists with implementing this, or is there a tidy way to alter what core normally does?

Thanks

Can't change Access Denied message to custom text.

Drupal 7. Danland theme.

I'd like to change the generic Access Denied message to a custom text. I have created a node (Basic page) with the custom text and pointed the Default 403 to it in Configuration/System/SiteInfo. Saved it. Logged out. When I go to the site as an Anonymous User, I still get the Default 403 message.

Any suggestions? Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x