Skip to content

Instantly share code, notes, and snippets.

@imarklee
Created April 5, 2014 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imarklee/9994892 to your computer and use it in GitHub Desktop.
Save imarklee/9994892 to your computer and use it in GitHub Desktop.
User permalink
<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');
// Assuming that you already have the user's id
$user = Foundry::user($id);
// Generate the permalink of a user
// If you want the & to be replaced to &amp;
$xhtml = true;
// If you are using this in an e-mail (it will compute the appropriate domain path)
$external = false;
?>
<a href="<?php echo $user->getPermalink($xhtml, $external);?>"><?php echo $user->getName();?></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment