change author id works for prof profil and prof form

This commit is contained in:
asus
2024-03-18 12:23:27 +01:00
parent 82b6593dd9
commit 98dfb17bf4
6 changed files with 165 additions and 36 deletions

View File

@@ -19,7 +19,8 @@ class Custer {
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
const SLUG_TOOGLE_ADMIN_MENU = ['_name'=>'toogle_admin_menu_url_custer', 'toggle'=>'toggle', 'show'=>'show', 'hide'=>'hide'];
const TOGGLE_ADMIN_MENU = ['_name'=>'toggle_admin_menu_option_custer', 'show'=>'show', 'hide'=>'hide'];
const OPTION_TOGGLE_MENU = ['_name'=>'toggle_admin_menu_option_custer', 'show'=>'show', 'hide'=>'hide'];
const OPTION_ANCHOR = 'custer_anchor_ids';
private static $_backup_current_user = null;
@@ -38,6 +39,9 @@ class Custer {
}
public static function reset_current_user_backup() {
$backup_user = self::$_backup_current_user;
if ($backup_user === null) {
$backup_user = get_current_user_id();
}
self::$_backup_current_user = null;
return $backup_user;
}