$wpdb->$table_name
不是有效的表名。使用$table_name
$wpdb->query( $wpdb->prepare(
"
INSERT INTO $wpdb->$table_name
( first_name, last_name, email,telephone,user_name)
VALUES ( %s, %s, %s,%s,%s )
",
$first_name,$last_name,$email,$telephone,$current_username
) );
应该是
$wpdb->query( $wpdb->prepare(
"
INSERT INTO $table_name
( first_name, last_name, email,telephone,user_name)
VALUES ( %s, %s, %s,%s,%s )
",
$first_name,$last_name,$email,$telephone,$current_username
) );