by Kieran Briggs.
Hi,
I've added a new set of fields to the user profile for different social media sites.
I'm building a block now to show the links if they have filled them in.
I've written the code to show the icon to link to. What i am struggling with it getting access to that field.
I want to run this type of code
If (<profile field is filled in>) {
$socialmedia = html_writer::nonempty_tag('a',html_writer::empty_tag('img', array('src' => $this->pix_url('twitter', 'block_course_overview_plus'), 'class' => 'iconlarge')), array('href' => 'http://www.twitter.com/<userfield>'));
}
The field is at $USER -> profile -> twitter
How to I get this in code?
Thanks
Kieran