remove a warning when adding users when not logged in (could happen if OPT_AUTH isn't turned on yet
This commit is contained in:
parent
a0c030413a
commit
fe223e3b29
|
@ -835,12 +835,13 @@ if ( !empty($action) ) {
|
||||||
if ( count( $changes ) ) {
|
if ( count( $changes ) ) {
|
||||||
if ( !empty($_REQUEST['uid']) ) {
|
if ( !empty($_REQUEST['uid']) ) {
|
||||||
dbQuery( "update Users set ".implode( ", ", $changes )." where Id = ?", array($_REQUEST['uid']) );
|
dbQuery( "update Users set ".implode( ", ", $changes )." where Id = ?", array($_REQUEST['uid']) );
|
||||||
|
# If we are updating the logged in user, then update our session user data.
|
||||||
|
if ( $user and ( $dbUser['Username'] == $user['Username'] ) )
|
||||||
|
userLogin( $dbUser['Username'], $dbUser['Password'] );
|
||||||
} else {
|
} else {
|
||||||
dbQuery( "insert into Users set ".implode( ", ", $changes ) );
|
dbQuery( "insert into Users set ".implode( ", ", $changes ) );
|
||||||
}
|
}
|
||||||
$refreshParent = true;
|
$refreshParent = true;
|
||||||
if ( $dbUser['Username'] == $user['Username'] )
|
|
||||||
userLogin( $dbUser['Username'], $dbUser['Password'] );
|
|
||||||
}
|
}
|
||||||
$view = 'none';
|
$view = 'none';
|
||||||
} elseif ( $action == 'state' ) {
|
} elseif ( $action == 'state' ) {
|
||||||
|
|
Loading…
Reference in New Issue