aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_modify.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-02-02 00:55:18 +0000
committergweltas <gweltas@piwigo.org>2004-02-02 00:55:18 +0000
commitbef4b3e3aa8e3d54cbf8b4962b9b5d4a89b55429 (patch)
tree647b2cf07ee8451a9314e1e8aebd11d9396cb32b /admin/user_modify.php
parenteea989f019f21fbd7ae4aa8e2f4a1503992c23bf (diff)
Merge of the 1.3.1 release
Creation of an unique include file (common.php) Creation of an unique define file (include/constants.php) Modification of the installation procedure git-svn-id: http://piwigo.org/svn/trunk@345 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/user_modify.php')
-rw-r--r--admin/user_modify.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/admin/user_modify.php b/admin/user_modify.php
index e49d3b3b0..cc6486c7a 100644
--- a/admin/user_modify.php
+++ b/admin/user_modify.php
@@ -39,6 +39,7 @@ $query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
$page['username'] = $row['username'];
$page['status'] = $row['status'];
+if ( !isset( $row['mail_address'] ) ) $row['mail_address'] = '';
$page['mail_address'] = $row['mail_address'];
// user is not modifiable if :
// 1. the selected user is the user "guest"
@@ -62,10 +63,7 @@ if ( sizeof( $error ) == 0 and isset( $_POST['submit'] ) )
{
// shall we use a new password and overwrite the old one ?
$use_new_password = false;
- if ( $_POST['use_new_pwd'] == 1)
- {
- $use_new_password = true;
- }
+ if ( isset( $_POST['use_new_pwd'] ) ) $use_new_password = true;
// if we try to update the webmaster infos, we have to set the status to
// 'admin'
if ( $row['username'] == $conf['webmaster'] )
@@ -88,7 +86,7 @@ if ( isset( $_POST['submit'] ) )
while ( $row = mysql_fetch_array( $result ) )
{
$dissociate = 'dissociate-'.$row['id'];
- if ( $_POST[$dissociate] == 1 )
+ if ( isset( $_POST[$dissociate] ) )
{
$query = 'DELETE FROM '.PREFIX_TABLE.'user_group';
$query.= ' WHERE user_id = '.$_GET['user_id'];
@@ -103,6 +101,8 @@ if ( isset( $_POST['submit'] ) )
$query.= ' ('.$_GET['user_id'].','.$_POST['associate'].')';
$query.= ';';
mysql_query( $query );
+ // synchronize category informations for this user
+ synchronize_user( $_GET['user_id'] );
}
//-------------------------------------------------------------- errors display
if ( sizeof( $error ) != 0 )
@@ -124,7 +124,7 @@ if ( sizeof( $error ) == 0 and isset( $_POST['submit'] ) )
$url = add_session_id( './admin.php?page=user_list' );
$vtp->setVar( $sub, 'confirmation.url', $url );
$vtp->closeSession( $sub, 'confirmation' );
- if ( $use_new_pwd )
+ if ( $use_new_password )
{
$vtp->addSession( $sub, 'password_updated' );
$vtp->closeSession( $sub, 'password_updated' );