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.

How to delete a code line

Home Forums Community Forum How to delete a code line

This topic contains 11 replies, has 2 voices. Last updated by  Bruce 3 years, 5 months ago.

Topic Author Topic
Posted: Thursday Jul 25th, 2013 at 3:58 pm #54091
Prolet
Username: vesta

Hi,
Thank you so much for this video http://www.s2member.com/videos/73410BDAD0526234/

Before to see it I couldn’t understand why I can’t set up website users to login into a login page even though all settings are right. Whatever i do, the user’s are log into wp-dashboard.

My question is how to follow Jason’s advise? I can’t delete

input type="hidden" value="http://www.example.com/wp-admin/" name="redirect_to">

I can delete it with firebug but not safe it.

Please advise!

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Thursday Jul 25th, 2013 at 4:23 pm #54097
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

My question is how to follow Jason’s advise? I can’t delete

The idea of deleting this line in Firebug is to show that this is the problem that’s causing the incompatibility. The generation of a redirect_to variable is to be expected and useful. It’s what s2Member uses to redirect to the Login Welcome Page. The reason that this redirect wouldn’t work is that either your theme or another plugin is setting this redirect_to variable before s2Member does.

Usually this variable is set through the URL you’re linking Users to your wp-login.php page from. Is there a ?redirect_to=/ appended to the URL when this happens? If so you may just need to edit the URL that you’re using to link to the login page with.

Posted: Thursday Jul 25th, 2013 at 4:44 pm #54100
Prolet
Username: vesta

Thank you, Bruce!

I’m so bad with coding that I don’t do anything than following instructions…

s2M said how to use replacement codes-I do and no result.
I mean, I looked wp-login.php and all is in language I’m afraid of :( I didn’t change it.

Anyway, all users will log into the dashboard and that is it :(

Thanks again for your help.

Posted: Thursday Jul 25th, 2013 at 4:59 pm #54103
Bruce
Username: Bruce
Staff Member

s2M said how to use replacement codes-I do and no result.

I’m not sure what you mean by this. Could you clarify where you’re using these replacement code, please?

Anyway, all users will log into the dashboard and that is it :(

Could I get a Dashboard login to your site to see what’s going on here? It would also be great if you could send a Level 1 account so I can test with a non-admin User.

You can send those details here: s2Member® » Private Contact Form

Posted: Thursday Jul 25th, 2013 at 5:11 pm #54106
Prolet
Username: vesta

~ AUTO-GENERATED NOTICE TO SUPPORT REPS

Action taken: I posted a private contact form and referenced this Topic.

Posted: Thursday Jul 25th, 2013 at 5:13 pm #54108
Prolet
Username: vesta

Bruce,
I meant the replacement codes s2m-General Options-Login Welcome page

Also I sent you the requested details.

Thank you!

Posted: Thursday Jul 25th, 2013 at 5:19 pm #54109
Bruce
Username: Bruce
Staff Member

I got your details.

It looks like the plugin Adminimize is causing this to me. Do you mind if I turn off a few plugins momentarily to see if I can narrow down the problem to a specific plugin?

Posted: Thursday Jul 25th, 2013 at 5:26 pm #54110
Bruce
Username: Bruce
Staff Member

I meant the replacement codes s2m-General Options-Login Welcome page

For these, the replacement codes are only available for the redirection itself, and are an advanced feature. Right now you’re not getting any redirection at all, so we can’t test that right now.

If you’re looking for a way to get information about the User on the page, the best way to do that would be to use the Constants that s2Member sets for each User in conjunction with the s2Get Shortcode:

Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants

Posted: Friday Jul 26th, 2013 at 3:35 am #54124
Prolet
Username: vesta

Hi Bruce,

I’m sorry I didn’t reply before. We are living in different time zone and for me was midnight already.

I don’t mind you to do whatever you have, just to find the right solution for the girls who have the website.

Thank you!

Posted: Friday Jul 26th, 2013 at 11:29 pm #54189
Bruce
Username: Bruce
Staff Member

Thanks for your patience.

I don’t mind you to do whatever you have, just to find the right solution for the girls who have the website.

Got it. I’ll see if I can find the source of the trouble. I’ll get back to you ASAP.

Posted: Friday Jul 26th, 2013 at 11:47 pm #54190
Bruce
Username: Bruce
Staff Member

Sorry, but I’m not able to log in anymore. I just tried logging in with the administrator details you sent and the site is not loading when I attempt to log in via /wp-login.php. I’m not sure why that is. Is the server undergoing maintenance?

I will try it again in a bit.

EDIT: I got in. Taking a look.

Posted: Saturday Jul 27th, 2013 at 1:40 am #54195
Bruce
Username: Bruce
Staff Member

Got it fixed.

The problem was with how you set up your Capabilities. s2Member redirects only if a User does not have the capability edit_posts to prevent Users such as Editors or Administrators from being redirected to your Login Welcome Page.

You have Capabilities Manager installed, and enabled that capability on some of your Roles, which was causing the issue. I’m not sure why you did that, but I did add a little hack to your site that will make it so that only Users that aren’t Administrators should be redirected. Here’s the code I added to your s2hacks.php file:

Knowledge Base » Hacking s2Member® Via Hooks/Filters

FYI: Since you’re editing your Roles this way, you should lock your Roles and Capabilities so these changes don’t get overridden when you update s2Member.

See: Knowledge Base » Locking s2Member Roles/Capabilities

Viewing 11 replies - 1 through 11 (of 11 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.