2 /** @file user.hooks.admin
3 * User administrative hooks
9 function user_admin_page(){
11 global $admin_links, $admin_notices, $user;
13 if(user_access('user admin settings')){
14 $admin_links['Users']['Users'][] = array('href' => 'user/admin/settings', 'text' => 'User\'s settings', 'help' => 'Configure the settings for users');
15 $admin_links['Users']['Users'][] = array('href' => 'user/admin/list', 'text' => 'User\'s Listing', 'help' => 'View a list of the current users in the website');
19 $q = "SELECT created, access, login FROM {PRE_}users WHERE uid = " . $user['uid'];
22 $m = time() - $r[0]['login'];
25 $time = $m / 60 . " minutes";
28 $time = ($m / 60)/60 . " hours";
31 $admin_notices['users'] = "Welcome " . $user['name'] . " your last session was " . date("D, d Y", $r[0]['access']) . " and you have been logged in for " . $time;