function _hosting_site_goto_link in Hosting 6.2
Same name and namespace in other branches
- 7.4 site/hosting_site.module \_hosting_site_goto_link()
- 7.3 site/hosting_site.module \_hosting_site_goto_link()
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 site/
hosting_site.nodeapi.inc - Implementation of hook_view().
File
- site/
hosting_site.module, line 137
Code
function _hosting_site_goto_link($node) {
$cache = cache_get("hosting:site:" . $node->nid . ":login_link");
if (user_access('create login-reset task') && $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,
));
}
$url = "node/" . $node->nid . "/goto_site";
return theme('hosting_site_goto_link', $title, $url);
}