Reply To: Block User – Add a Warning


Home › Forums › Front End PM PRO › Block User – Add a Warning › Reply To: Block User – Add a Warning

#18144
Shamim Hasan
Keymaster

User can unblock from the same place if they accidentally block any user. Still if you want to show confirmation see following.
You can add following code in block-unblock.js after e.preventDefault();

if ( ! confirm( 'Do you really want to block/unblock this user?' ) ) {
	return false;
}

Currently user name do not pass to js, so we cannot show name. Also from js we do not know if we are blocking or unblocking user. So confirmation is require in both block and unblock request. You can adjust message to show.