latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Add Member to all sites w/ upgrade

Home Forums Community Forum Unofficial Extensions/Hacks Add Member to all sites w/ upgrade

This topic contains 1 reply, has 1 voice. Last updated by  Jan Kingsley 3 years, 3 months ago.

Topic Author Topic
Posted: Thursday Sep 12th, 2013 at 4:51 am #59487

Hello, I have added some code to the functions.php file in our themes database which allows me to customize the upgrade email sent to members. We have a multi-site network with a few sub-sites, all represented by a single website (aspel.org). Is there a code I can use so that when I upgrade a member in our directory site, they are automatically added/upgraded to one of our other sites? Any and all help is much appreciated.

Cheers,
Jon

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Sep 12th, 2013 at 5:05 am #59489

Also, I would like to auto-generate a password in the upgrade email. This is the current code I’m using. It is without a password generator. Is there a way to do this?

function user_role_update( $user_id, $new_role ) {
if ($new_role == “s2member_level1”) {
$site_url = get_bloginfo(‘wpurl’);
$user_info = get_userdata( $user_id );
$to = $user_info->user_email;
$subject = “ASPEL Membership Approved”;
$message = “Hello ” .$user_info->display_name . “, Congratulations! Your ASPEL Membership has been approved.

Du ” .$user_info->password . ” ” .$user_info->username . ” kan nå logge inn på medlemssiden og lese medlemsblader, laste ned høydepunkter, delta i konkurranser og så videre.

Medlemspakken med det første medlemsbladet, plakat og medlemskort blir sendt ut i september. De to andre bladene blir gitt ut i desember og mai.

Med vennlig hilsen
NewUtd-teamet”;

}
}
add_action( ‘set_user_role’, ‘user_role_update’, 10, 2);
?>

and yes, I know some of the message is in English and some in another language. I’m worried about the coding…

Thanks for your help in advanced.

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.