Send a new message to new registered users
-
Hello Shamim,
Your code is not working. Can you control it or update?
function fep_new_user_message($user_id) { global $wpdb; $from = 1; //change with your admin id $title = 'SUBJECT'; //change message title $content = 'MESSAGE'; //change message content $date = current_time('mysql'); $table = $wpdb->prefix."fep_messages"; $wpdb->query($wpdb->prepare("INSERT INTO $table (from_user, to_user, message_title, message_contents, last_sender, date, last_date) VALUES ( %d, %d, %s, %s, %d, %s, %s )", $from, $user_id, $title, $content, $from, $date, $date)); } add_action( 'user_register', 'fep_new_user_message', 10, 1 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Send a new message to new registered users’ is closed to new replies.