## bug – unexpected error while using wp_delete_user() function?

Question

i use wp_delete_user() function to delete users

in document page says that function takes two arguments and first one(ID) is required and the second is optional

the problem i faced is for example i use this and it got error which i think is a kind of bug or something

wp_delete_user(46)


and this got is the error while i send the required parameters
also i should say i use the function in page template
whats the problem ?
could someone help me ?

Fatal error: Uncaught ArgumentCountError: Too few arguments to function wpdb::delete(), 1 passed in /home/mahanhse/domains/wpsite.com/public_html/wp-content/themes/hse/page-template/user_edti.php on line 21 and at least 2 expected in /home/mahanhse/domains/wpsite.com/public_html/wp-includes/wp-db.php:2389 Stack trace: #0 /home/mahanhse/domains/wpsite.com/public_html/wp-content/themes/hse/page-template/user_edti.php(21): wpdb->delete() #1 /home/mahanhse/domains/wpsite.com/public_html/wp-includes/template-loader.php(106): include('/home/mahanhse/...') #2 /home/mahanhse/domains/wpsite.com/public_html/wp-blog-header.php(19): require_once('/home/mahanhse/...') #3 /home/mahanhse/domains/wpsite.com/public_html/index.php(17): require('/home/mahanhse/...') #4 {main} thrown in /home/mahanhse/domains/wpsite.com/public_html/wp-includes/wp-db.php on line 2389

0
5 days 2021-11-23T15:49:10-05:00 0 Answers 0 views 0