Step 1 improvement issue 0000301:

o Change status of table #_user_infos
  o Don't send password to webmaster, guest, generic

Next Step:
  o Functions Check of status
  o Restricted Access for user generic

git-svn-id: http://piwigo.org/svn/trunk@1070 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2006-03-08 23:14:53 +00:00
parent cba56c06ed
commit b263f0c996
15 changed files with 160 additions and 33 deletions
+1 -1
View File
@@ -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'];
+1 -1
View File
@@ -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>';
+10 -8
View File
@@ -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
+2 -2
View File
@@ -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"';
}