[英]Change user registration from table wp_users to a new self made table
用户注册时,数据进入标准的wp_users表。 但是我做了一个新表,我想将所有(新)registrerd用户存储在那里。 我该如何改变?
add_action('user_register', 'myplugin_registration_save');
function myplugin_registration_save( $user_id ) {
// get the POST values and insert into the custom table
if ( isset( $_POST['first_name'] ) ) {
// save into the custom table created
}
}
这不会阻止在WordPress上创建用户,但是您可以将用户数据插入自定义表。 这对您有用吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.