diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/include/functions.php | 2 | ||||
-rw-r--r-- | admin/include/isadmin.inc.php | 2 | ||||
-rw-r--r-- | admin/mailtousers.php | 18 | ||||
-rw-r--r-- | admin/user_list.php | 4 |
4 files changed, 14 insertions, 12 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index f40b0e52f..9a748ef44 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1230,7 +1230,7 @@ SELECT user_id { $insert = array(); $insert['user_id'] = $user_id; - $insert['status'] = 'guest'; + $insert['status'] = 'normal'; $insert['template'] = $conf['default_template']; $insert['nb_image_line'] = $conf['nb_image_line']; $insert['nb_line_page'] = $conf['nb_line_page']; diff --git a/admin/include/isadmin.inc.php b/admin/include/isadmin.inc.php index 569fa1f94..eac0b295c 100644 --- a/admin/include/isadmin.inc.php +++ b/admin/include/isadmin.inc.php @@ -27,7 +27,7 @@ include( PHPWG_ROOT_PATH.'admin/include/functions.php' ); -if ($user['status'] != 'admin') +if (!is_admin()) { echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />'; echo '<a href="'.PHPWG_ROOT_PATH.'identification.php">'.$lang['identification'].'</a></div>'; diff --git a/admin/mailtousers.php b/admin/mailtousers.php index b1d402580..97cb51048 100644 --- a/admin/mailtousers.php +++ b/admin/mailtousers.php @@ -77,16 +77,18 @@ where */ function update_data_user_mail_notification() { -/* $query = ' -insert into '.USER_MAIL_NOTIFICATION_TABLE.' - (user_id, enabled) - (select id, \'false\' from '.USERS_TABLE.' - where mail_address is not null and id not in (select user_id from '.USER_MAIL_NOTIFICATION_TABLE.')) -;'; - pwg_query($query);*/ - global $conf, $page; + // Set null mail_address empty + $query = ' +update + '.USERS_TABLE.' +set + mail_address = null +where + trim(mail_address) = \'\';'; + pwg_query($query); + $query = ' select id user_id, username, mail_address diff --git a/admin/user_list.php b/admin/user_list.php index 64890e06b..4459955e0 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -377,7 +377,7 @@ DELETE FROM '.USER_GROUP_TABLE.' // Webmaster status must not be changed if ($conf['webmaster_id'] == $user_id and isset($data['status'])) { - $data['status'] = 'admin'; + $data['status'] = 'webmaster'; } array_push($datas, $data); @@ -649,7 +649,7 @@ foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) { $selected = $_POST['status'] == $status ? 'selected="selected"' : ''; } - else if ('guest' == $status) + else if ('normal' == $status) { $selected = 'selected="selected"'; } |