function _hosting_site_goto_link in Hostmaster (Aegir) 6
Generate a link allowing the user to log into their new site, or simply go to the site front page if the link has expired.
1 call to _hosting_site_goto_link()
- hosting_site_view in modules/
hosting/ site/ hosting_site.nodeapi.inc - Implementation of hook_view().
File
- modules/
hosting/ site/ hosting_site.module, line 104
Code
function _hosting_site_goto_link($node) {
$cache = cache_get("hosting:site:" . $node->nid . ":login_link");
if (user_access('create login-reset task') && !is_null($cache) && time() < $cache->data['expire']) {
$title = t("Log in to !url", array(
'!url' => $node->title,
));
}
else {
$title = t("Go to !url", array(
'!url' => $node->title,
));
}
$options['attributes']['class'] = 'hosting-goto-site-link';
return l($title, "node/" . $node->nid . "/goto_site", $options);
}