Title: Block user with a script (2)
Last modified: April 13, 2023

---

# Block user with a script (2)

 *  [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/block-user-with-a-script-2/)
 * Hi [@gioni](https://wordpress.org/support/users/gioni/),
 * I’m back on this thread because I still have a little issue using my script.
   
   It is working well when used manually by the site admin (action hook), but when
   I need to use my script through a server’s cronjob (which is not wp-cron), the
   cerber_block_user function fails because of the first check :
 *     ```
       	if ( ! is_super_admin() ) {
       		return;
       	}
       ```
   
 * Is it possible for you to move that check to a different level that would not
   block using this function from outside please ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fblock-user-with-a-script-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Block user with a script (2)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-cerber_77a9bf.svg)
 * [WP Cerber Security, Anti-spam & Malware Scan](https://wordpress.org/plugins/wp-cerber/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cerber/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cerber/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cerber/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cerber/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cerber/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/block-user-with-a-script-2/)
 * Status: not resolved