I'm currently displaying a block on my D7 site' homepage.
Now I've a requirement to display that block only if the logged in user has a specific value in their profile.
I know it can be done using php evaluation by navigating to the bottom of the block and then click (Pages > Pages on which this PHP code returns TRUE ) but have no experience in writing php scripts.
global $user;
If($user->your_profile_field_value == 'requiredvalue')
{
// display the block
// display the block only on 'homepage' }
Else { // don't display the block }
I'm new to php can someone please help me fill in the blanks in above code snippet.
thanks