mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
related to #2158 update user and guest pop in
- Implementation of a new modal for modifying a user or guest - Addition of a function to allow plugins to add a tab to the new user modal - Fix bug: "badger-number" is updated when a user is added or deleted - Fix bug: When the user who is editing has permissions to delete the user he is modifying, the delete icon is now displayed correctly - Added a new api method for modifying the main user and generating a link to reset a password - Passed $conf[‘webmaster_id’] in database configuration
This commit is contained in:
@@ -100,6 +100,15 @@ SELECT
|
||||
$password_protected_users = array_merge($password_protected_users, array_diff($admin_ids, array($user['id'])));
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
username
|
||||
FROM '.USERS_TABLE.'
|
||||
WHERE id = '.$conf['webmaster_id'].'
|
||||
;';
|
||||
|
||||
$owner_username = query2array($query, null, 'username');
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'U_HISTORY' => get_root_url().'admin.php?page=history&filter_user_id=',
|
||||
@@ -117,7 +126,8 @@ $template->assign(
|
||||
'filter_group' => (isset($_GET['group']) ? $_GET['group'] : null),
|
||||
'connected_user' => $user["id"],
|
||||
'connected_user_status' => $user['status'],
|
||||
'owner' => $conf['webmaster_id']
|
||||
'owner' => $conf['webmaster_id'],
|
||||
'owner_username' => $owner_username[0]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -184,6 +194,23 @@ else
|
||||
//Show 10 users by default
|
||||
$template->assign('pagination', userprefs_get_param('user-manager-pagination', 10));
|
||||
}
|
||||
|
||||
function webmaster_id_is_local()
|
||||
{
|
||||
$conf = array();
|
||||
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
|
||||
@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
|
||||
if (isset($conf['local_dir_site']))
|
||||
{
|
||||
@include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
|
||||
}
|
||||
return $conf['webmaster_id'] ?? false;
|
||||
}
|
||||
|
||||
if (webmaster_id_is_local())
|
||||
{
|
||||
$page['warnings'][] = l10n('You have specified <i>$conf[\'webmaster_id\']</i> in your local configuration file, this parameter in deprecated, please remove it!');
|
||||
}
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user