function hosting_site_post_hosting_login_reset_task in Hosting 7.3
Same name and namespace in other branches
- 6.2 site/hosting_site.drush.inc \hosting_site_post_hosting_login_reset_task()
- 7.4 site/hosting_site.drush.inc \hosting_site_post_hosting_login_reset_task()
Implements hook_post_hosting_login_reset_task().
File
- site/
hosting_site.drush.inc, line 289 - Drush hooks for the Hosting site module.
Code
function hosting_site_post_hosting_login_reset_task($task, $data) {
if ($task->ref->type == 'site') {
$task->ref->no_verify = TRUE;
node_save($task->ref);
$context = $data['context'];
if ($context['login_link']) {
// we need to store the timestamp too because expire only means it can be deleted
// after an amount of time, not will be deleted.
$cache = array(
'expire' => strtotime("+24 hours"),
'link' => $context['login_link'],
);
cache_set('hosting:site:' . $task->ref->nid . ':login_link', $cache, 'cache', $cache['expire']);
}
}
}