Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
itthinx Groups Newsletters - autosusbcribed
add_action('user_register', 'my_user_register');
function my_user_register( $user_id ) {
if ( update_user_meta( $user_id, 'groups_newsletters_subscriber', 'yes' ) ) {
$hash = md5( time() + rand( 0, time() ) );
$datetime = date( 'Y-m-d H:i:s', time() );
update_user_meta( $user_id, 'groups_newsletters_hash', $hash );
update_user_meta( $user_id, 'groups_newsletters_datetime', $datetime );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.