Statistics: Posted by Cristián Lávaque — September 25th, 2011, 11:13 pm
Cristián Lávaque wrote:
The default after registration is to have the user login. I wrote a hack to have him logged in automatically after registration and redirected to the page you specify. Here it is:
/wp-content/mu-plugins/s2hacks.php
- Code:
<?php
add_action('ws_plugin__s2member_during_configure_user_registration_front_side', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
wp_set_auth_cookie($vars['user_id'], false, is_ssl());
wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');
exit;
}
?>
I hope it helps.
Statistics: Posted by cexpert — September 20th, 2011, 11:07 pm
add_action('ws_plugin__s2member_during_configure_user_registration_front_side_free', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
if (!is_admin() && $vars['processed'] === 'yes') {
wp_new_user_notification($vars['user_id'], $vars['pass']);
wp_set_auth_cookie($vars['user_id'], false, is_ssl());
wp_redirect('http://domain.com/download-' . $vars['__refs']['level']);
exit();
}
}
add_filter("ws_plugin__s2member_process_list_servers", "__return_true");
Statistics: Posted by seofeed — September 12th, 2011, 12:00 am
<?php echo '<script type="text/javascript">window.location = \'http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . '\';</script>'; ?>
Statistics: Posted by Cristián Lávaque — August 31st, 2011, 10:51 pm
wp_redirect('http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . '?first');
<?php header('Location: http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL); ?>
Statistics: Posted by Cristián Lávaque — August 30th, 2011, 6:19 pm
seofeed wrote:
Forget to mention: since no role is assigned they are sent to the pricing options page for the correct download page.
Statistics: Posted by Cristián Lávaque — August 29th, 2011, 12:30 pm
Statistics: Posted by seofeed — August 28th, 2011, 10:51 am
<?php
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
if (!is_admin() && $vars['processed'] === 'yes') {
wp_new_user_notification($vars['user_id'], $vars['pass']);
wp_set_auth_cookie($vars['user_id'], false, is_ssl());
wp_redirect('http://domain.com/download-' . $vars['__refs']['level'] . '?first');
exit();
}
}
?>
Statistics: Posted by Cristián Lávaque — August 27th, 2011, 10:50 pm
wp_redirect('http://domain.com/download-' . $vars['__refs']['level'] . '?first');
Statistics: Posted by Cristián Lávaque — August 27th, 2011, 2:49 am
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
if (!is_admin() && $vars['processed'] === 'yes') {
wp_new_user_notification($vars['user_id'], $vars['pass']);
wp_set_auth_cookie($vars['user_id'], false, is_ssl());
wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');
exit();
}
}
Statistics: Posted by seofeed — August 27th, 2011, 12:06 am
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
members-area <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(members-area())); ?></p>
Statistics: Posted by RJGonzalez — August 17th, 2011, 3:28 am
wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');
Statistics: Posted by RJGonzalez — August 17th, 2011, 3:22 am
<?php } elseif ($_GET['s2member_level_required'] === '0') { ?>
By registering now...
<?php } elseif ($_GET['s2member_level_required'] === '1') { ?>
Premium Access Pass...
<?php } ?>
Statistics: Posted by Cristián Lávaque — August 17th, 2011, 3:15 am
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
Statistics: Posted by RJGonzalez — August 17th, 2011, 3:14 am
<?php } elseif { ($_GET['s2member_level_required'] === '0') ?>
By registering now...
<?php } elseif { ($_GET['s2member_level_required'] === '1') ?>
Premium Access Pass...
<?php } ?>
Statistics: Posted by rwilki — August 17th, 2011, 3:10 am