Cristián Lávaque
Forum Replies Created
-
Thank you so much! 😀
Thank you very much! 😀
Hi!
That would be from one of protections (Simultaneous Login, Unique IP Access, Brute Force IP/Login). WP Admin > s2Member > Restriction Options
I think you’re referring to the “too many IP addresses accessing one secure area” message, so that’d be the Unique IP Access protection.
I’m guessing that that particular customer maybe logs in from more places than usual, having different IPs, and goes beyond the number you have set in your configuration for the protection.
You can either change the setting to is less strict and is less likely to be triggered by him, or you can reset his restriction from his profile when it happens.
Does that help? 🙂
Thank you so much, @aflorarte !
I can’t express enough how much I appreciate that you took a moment to write this. <3
I do what I can. And I’ll keep improving s2 and helping you guys.
Thank you! 🙂
I see. Well, maybe s2 isn’t yet loaded at that point, maybe. Then you can try other code, like with WP’s functions. Mine was just an example. If your body tag is already in an echo, opening PHP tag would give an error, so you need to study your code to make sure it’s right for your template.
If you want to customize some content on a page based on the role, maybe the s2If shortcode would help. https://s2member.com/kb-article/s2if-simple-shortcode-conditionals/
🙂
Just try the code and see the effect with the different users. If the current user doesn’t have an s2Member Level, no s2Member level will be gotten from that code. That code only gets the name of the current user’s s2member_access_role, it doesn’t give one to the user.
And you don’t have to use s2’s function for that, that was just an example to help you. You can use a regular WordPress function to get the current user’s WordPress role, too. https://wordpress.stackexchange.com/questions/239769/how-to-get-the-role-name-of-the-current-user-wordpress
🙂
- This reply was modified 5 years, 2 months ago by Cristián Lávaque.
Hi @waseemsoa
Well, you’d edit your theme’s template with a bit of PHP that gets the current user’s s2 level role to put it in the body tag’s class attribute. E.g.
<body class="<?php echo get_user_field('s2member_access_role'); ?>">🙂
- This reply was modified 5 years, 2 months ago by Cristián Lávaque.
Right, you need to enable captcha from the shortcode, but to enable it’s not “1”, it’d be
captcha="light". From the documentation for that attribute: WP Admin > s2Member > PayPal Forms > Shortcode Attributescaptcha=""if you supplied reCaptcha v2 keys in your s2Member General Options (i.e., you are using reCaptcha v2), this must belightordark.🙂
Hi @waseemsoa
You’d use a conditional to hide/show things based on the user’s access. https://s2member.com/kb-article/s2if-simple-shortcode-conditionals/#toc-d2e17c3b
You may want to watch this video about using s2 and BP together: https://www.youtube.com/watch?v=9yiph5uqXgI
See also: WP admin > s2Member > General > Registration/Login Fields & Options > Integrate with BuddyPress
I hope that helps 🙂
Hi Bell.
You can show links to those pages to everyone if you want, and that won’t remove the protection on the page. Just tweak the settings here: WP Admin > s2Member > Restriction Options > Alternative View Protection
Another option is to not protect the whole page with a Level/ccap, and instead use a conditional in its body, as Seth suggested. It won’t redirect the user, but could show a different message on that same page. https://s2member.com/kb-article/s2if-simple-shortcode-conditionals/
The conditional is not something that gets applied to several pages at once, you need to add it to each one, but gives you more power to customize what the user gets, tailored to what he was looking for. So, for example, you can have a teaser and signup button for those that don’t have access, and the premium content for those that do.
I hope that helps. 🙂
Hi Jul.
That’s not something s2Member adds… It’s a nice idea, though! I’m making a note.
What you can do is send users a password instead of letting them pick one on registration. WP Admin > s2Member > General > Registration/Profile Fields & Options > Custom Password
That way they have to use the link they get by email to set the password.
Then in the users list, you can see from the logins counter who never logged into his account yet, and those who logged in obviously got their email and could open it.
Also possible, although a bit more advanced, would be to have in the Login Welcome Page, a bit of PHP that gives them a capability (e.g. verif_email) or changes their role (e.g. s2Member Level 1). https://s2member.com/kb-article/rolescapabilities-via-php/
I hope that helps. 🙂
Hi Jul.
Do you have registrations open on wp-login.php? Is this setting disabled or enabled? WP Admin > s2Member > General Options > Open Registration
Did you enable recaptcha for the pro-form? WP Admin > s2Member > General > Captcha
🙂
Hi Jul.
It sounds like something in your setup is causing a JS conflict… I haven’t had this particular error reported by anyone else, and I don’t get it myself either.
The source of most pro-form JS problems on pages is some other plugin or the theme. So I’d test those first. Also weird is that before the previous version didn’t give you trouble and now it does, so it sounds like something else changed, not s2.
You can deactivate other plugins, and see after each if the problem goes away. This will be easier in the staging site than the production one, of course, although there are plugins that let you manage plugins and deactivate them on particular pages only, which is very helpful for troubleshooting.
Do those tests and let me know what you find, please. 🙂
(By the way, for Pro support, our forum is over at https://f.wpsharks.com/c/s2member This one is for the Framework distributed in this repo, and I’m not really supposed to give Pro support here. Just letting you know for next time.)
Hi Tina.
You’re referring to the s2Member-List shortcode, right? https://s2member.com/kb-article/s2member-list-shortcode-documentation/
Well, you have the
link_display_nameattribute that you can customize for the link:link_display_name: Optional, defaults to “” (an empty string; i.e., no link). If you want to link the user’s display name to another area of your site (e.g., a user profile page) you can set this to a URL of your choosing. If you decide to customize this, the following Replacement Codes are available if you need them: %%ID%%, %%username%%, %%nicename%%, %%display_name%%, %%email%%, %%md5.email%% (an MD5 hash of the email address). If you’re using BuddyPress you might set this to: /members/%%nicename%%/
Does that help? 🙂
Hi Brian.
Yes, if you want to protect all posts, you can just add the “all” keyword in the Level 1 restriction box under: WP Admin > s2Member > Restriction Options > Post > Level 1.
If you have some posts that need to remain unprotected, what you can do is group the ones you do want to protect, using a category or tag, and then protect that with Level 1. You’ll find the Category and Tag restrictions on that same page.
Does that help? 🙂