ID != get_current_user_id() && ITSEC_Core::current_user_can_manage() ) { $temp_role = intval( get_user_meta( $user->ID, 'itsec_privilege_role', true ) ); $temp_role_expires = trim( get_user_meta( $user->ID, 'itsec_privilege_expires', true ) ); $current_role = $this->get_current_role( $user ); echo '
' . __( 'Set Temporary Role', 'it-l10n-ithemes-security-pro' ) . ' | '; echo '';
if ( $temp_role != 0 && $temp_role_expires > $itsec_globals['current_time'] ) {
switch ( $temp_role ) {
case 3:
$temp_role_text = __( 'Network Administrator', 'it-l10n-ithemes-security-pro' );
break;
case 2:
$temp_role_text = __( 'Administrator', 'it-l10n-ithemes-security-pro' );
break;
case 1:
$temp_role_text = __( 'Editor', 'it-l10n-ithemes-security-pro' );
break;
}
printf(
'%s %s. %s %s. %s',
__( 'The user has already been temporarily upgraded to the role of ', 'it-l10n-ithemes-security-pro' ),
$temp_role_text,
__( 'This upgrade expires at', 'it-l10n-ithemes-security-pro' ),
date( 'l F jS, Y \a\t g:i a', $temp_role_expires ),
admin_url( 'user-edit.php' ),
$user->ID,
wp_create_nonce( 'itsec_clear_privilege' ),
__( 'Click here to clear', 'it-l10n-ithemes-security-pro' )
);
} elseif ( ( is_multisite() && $current_role < 3 ) || $current_role < 2 ) {
echo '
' . __( 'Set the role which you would like to assign to the user temporarily and for how long you would like it to last.', 'it-l10n-ithemes-security-pro' ) . ' '; } else { echo __( 'This user has already been permanently upgraded to the maximum level. No further action can be taken.', 'it-l10n-ithemes-security-pro' ); } echo ' | ';
echo '
---|