ID, 'create_users') or user_can( $albopc_riga->ID, 'manage_network'))) { $albopc_users = new WP_User( $albopc_riga->ID); $albopc_users->remove_cap("gest_atti_albo"); $albopc_users->remove_cap("editore_atti_albo"); $albopc_users->remove_cap("admin_albo"); } } // Crea capacit࠵tenti di gestione ed amministrazione Al Pretorio in base a quanto scelto dall'Utente foreach($_REQUEST as $albopc_key=>$albopc_val){ $albopc_UID=substr($albopc_key,1); if (is_numeric($albopc_UID)){ $albopc_users = new WP_User($albopc_UID); if ($albopc_val=="Amministratore"){ $albopc_users->add_cap("admin_albo"); $albopc_users->add_cap("editore_atti_albo"); $albopc_users->add_cap("gest_atti_albo"); } if ($albopc_val=="Editore"){ $albopc_users->add_cap("editore_atti_albo"); $albopc_users->add_cap("gest_atti_albo"); } if ($albopc_val=="Gestore") $albopc_users->add_cap("gest_atti_albo"); } } }else{ $albopc_Msg=__("ATTENZIONE. Rilevato potenziale pericolo di attacco informatico, l'operazione è stata annullata","albo-pretorio-on-line"); } }else{ $albopc_Msg=__("ATTENZIONE. Rilevato potenziale pericolo di attacco informatico, l'operazione è stata annullata","albo-pretorio-on-line"); } } echo '

Permessi Utente

'; if (isset($albopc_Msg)) { echo '

'.esc_html($albopc_Msg).'

'; } echo '
'; $albopc_lista=albopc_get_users(); foreach($albopc_lista as $albopc_riga){ $albopc_users = new WP_User( $albopc_riga->ID); $albopc_Utente=false; if ($albopc_users->has_cap('gestore_albo') or $albopc_users->has_cap('editore_albo') or $albopc_users->has_cap('amministratore_albo')) $albopc_Utente=true; if (!(user_can( $albopc_riga->ID, 'create_users') or user_can( $albopc_riga->ID, 'manage_network'))) { $albopc_Stato=''; $albopc_StatoEditore=''; $albopc_StatoGestore=''; echo ''; if (user_can( $albopc_riga->ID, 'gest_atti_albo')){ $albopc_Stato=''; $albopc_StatoEditore=''; $albopc_StatoGestore='checked'; } if (user_can( $albopc_riga->ID, 'editore_atti_albo')){ $albopc_Stato=''; $albopc_StatoEditore='checked'; $albopc_StatoGestore=''; } if (user_can( $albopc_riga->ID, 'admin_albo')){ $albopc_Stato='checked'; $albopc_StatoEditore=''; $albopc_StatoGestore=''; } if (!$albopc_Utente) echo ' '; else echo ' '; if ($albopc_users->has_cap('amministratore_albo')) echo ''; else echo ''; if ($albopc_users->has_cap('editore_albo')) echo ''; else echo ''; if ($albopc_users->has_cap('gestore_albo')) echo ''; else echo ''; echo ' '; } } echo '
'.esc_html__("Utente","albo-pretorio-on-line").' '.esc_html__("Azzera Capacità Utente","albo-pretorio-on-line").' '.esc_html__("Capacità di Amministrare l'Albo","albo-pretorio-on-line").' '.esc_html__("Capacità di Editore dell'Albo","albo-pretorio-on-line").' '.esc_html__("Capacità di Gestire l'Albo","albo-pretorio-on-line").' '.esc_html__("Ruolo Amministratore","albo-pretorio-on-line").' '.esc_html__("Ruolo Editore","albo-pretorio-on-line").' '.esc_html__("Ruolo Gestore","albo-pretorio-on-line").'
'.esc_html($albopc_riga->user_login).'      si--si--si--

';