Forum Replies Created
-
AuthorPosts
-
November 16, 2012 at 4:02 pm in reply to: eMember and WordPress default user roles not working #51235essexreporterMember
Wow, thanks so much- I never would have thought to check there!
So far, so good. I think this problem is resolved!
Thanks again- have a great holiday
November 14, 2012 at 1:36 pm in reply to: eMember and WordPress default user roles not working #51233essexreporterMemberSure, here’s the link: [http://www.essexreporter.com/admin/join-us-4]
When guests click our Subscribe Now button, it leads them to this page. Behind the scenes, is [wp_eStore_subscribe_fancy id=1].
Thanks for checking it out!
November 13, 2012 at 1:51 pm in reply to: eMember and WordPress default user roles not working #51231essexreporterMemberFrom the dashboard, I can create any user with the correct info, but for new users who use eStore to subscribe themselves, problems arise. I’m not sure if it’s eStore, the registration link or a bug in WordPress…
November 13, 2012 at 1:49 pm in reply to: eMember and WordPress default user roles not working #51230essexreporterMemberThe other users in my list have a subscriber role because I changed them to Subscribers.
I’m not sure what’s going on. I was happy to see your test user ended up a subscriber, but the trouble comes when I tested it (Went onto the site as a “Guest,” clicked on our “Subscribe Now” button on the site, actually paid $5 through Paypal and eStore and followed all registration links, made a new user) I ended up an Admin.
I don’t understand it either.
November 11, 2012 at 6:35 pm in reply to: eMember and WordPress default user roles not working #51227essexreporterMemberHere’s the current code:
function eMember_wp_create_user($user_name,$password,$email)
{
if (eMember_is_multisite_install()){//MS install
global $blog_id;
if($wp_user_id = email_exists($email)){// if user exists then just add him to current blog.
add_existing_user_to_blog( array( ‘user_id’ => $wp_user_id, ‘role’ => ‘subscriber’ ) );
return $wp_user_id;
}
$wp_user_id = wpmu_create_user($user_name, $password, $email);
eMember_log_debug(“Creating WP User using Multi site API. User ID: “.$wp_user_id.” Blog ID: “.$blog_id,true);
$role = ‘subscriber’;//TODO – add user as a subscriber first. The subsequent update user role function to update the role to the correct one
if (add_user_to_blog($blog_id, $wp_user_id, $role)){//Add user to the current blog
eMember_log_debug(“WP MS user successfully added to blog ID: “.$blog_id,true);
}else{
eMember_log_debug(“WP MS user addition to blog failed!”,false);
}
return $wp_user_id;
}
else{//Single site install
$wp_user_id = wp_create_user($user_name, $password, $email);
eMember_log_debug(“Creating WP User using single site API. User ID: “.$wp_user_id,true);
return $wp_user_id;
}
Seems correct, right?
November 11, 2012 at 6:30 pm in reply to: eMember and WordPress default user roles not working #51226essexreporterMemberHey,
So just reloaded a fresh copy of the eMember plugin thinking that would def work since I didn’t try it first….but no luck! I just tried to register and was automatically made an admin again…
Any other ideas?
-
AuthorPosts