Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37677

Display an extra field from the User Profile

$
0
0
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


Viewing all articles
Browse latest Browse all 37677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>