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.

Suhaib Siddiqi


My Latest Replies (From Various Topics)

Viewing 14 replies - 26 through 39 (of 39 total)
Author Replies
Author Replies
Posted: Tuesday Jul 31st, 2012 at 1:45 pm #20823

I tried several thing. I am unable to restrict URI generated by the wp plugin, which in the format of
/members/?pid=14&pagetitle=my_email&message_template=inbox
/members/?pid=14&pagetitle=my_email&message_template=compose
/members/?pid=14&pagetitle=my_email&message_template=sent
/members/?pid=14&pagetitle=my_email&message_template=deleted

Once level 0 login, he could access any URI starting with /members/

I tried hack to as I mentioned above.

Posted: Tuesday Jul 31st, 2012 at 9:15 am #20795

Cristian,

Yes I tried it with and without slash. No success yet, with hack or using Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions

Posted: Tuesday Jul 31st, 2012 at 3:55 am #20747

Hi Raam

I tried your suggestion already. It did not work. I also tried adding following code to the functions.php of the template, but it throw the user level 0 to s2Members options page immediately upon login. level 0 user cannot do anything with this code in functions.php. Any link he clicks, he get thrown to the options page.

<?php
    add_action ("wp", "my_custom_capabilities", 1);
    function my_custom_capabilities ()
        {
            if (fnmatch ("/members/", $_SERVER["REQUEST_URI"]) && !current_user_can ("access_s2member_ccap_members/"))
                {
                    header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
                    exit ();
                }
}
?>
Posted: Monday Jul 30th, 2012 at 7:44 pm #20723

Any suggestions?

Posted: Monday Jul 30th, 2012 at 2:27 am #20648

I am not sure what is going on. The URI restriction worked for a couple of days, then stopped. Now level 0 members can access URI defined for level 1.

Here are my URI for level 0

/members/
/members/?pid=2
/members/?pid=5&pagetitle=basic_search
/members/?pid=6&pagetitle=account_settings
/members/?pid=6&pagetitle=noitification
/members/?pid=6&pagetitle=upgrade_account
/members/?pid=10&pagetitle=online_mem
/members/?pid=5&pagetitle=search_result

And for level 1, I have

/members/?pid=14&pagetitle=my_email&message_template=inbox
/members/?pid=14&pagetitle=my_email&message_template=compose
/members/?pid=14&pagetitle=my_email&message_template=sent
/members/?pid=14&pagetitle=my_email&message_template=deleted
/members/?pid=4&pagetitle=album
/members/?pid=4&pagetitle=photo
/members/?pid=4&pagetitle=manage_album
/members/?pid=4&pagetitle=add_audio
/members/?pid=4&pagetitle=add_video
/members/?pid=12&pagetitle=add_blogs
/members/?pid=12&pagetitle=my_blogs
/members/?pid=5&pagetitle=advance_search
/members/?pid=5&pagetitle=zipcode_search
/members/?pid=5&pagetitle=save_searches
/members/?pid=6&pagetitle=privacy_settings
/members/?pid=6&pagetitle=skype_settings
/members/?pid=13&pagetitle=viewed_me
/members/?pid=13&pagetitle=i_viewed
/members/?pid=13&pagetitle=trending
/members/?pid=13&pagetitle=interest_cloud
/members/?pid=1&pagetitle=view_winks
/members/?pid=1&pagetitle=view_friends
/members/?pid=1&pagetitle=my_favourites
/members/?pid=1&pagetitle=my_matches
/members/?pid=1&pagetitle=alerts
/members/?pid=1&pagetitle=blocked
/cometchat/cometchatjs.php

Level 0 members can access all the URI which supposed to restricted for level 1.
I have not changed anything in s2Members configuration and no new plugins were installed. I tried disabling WP Super Cache, but still same problems.

The only thing works is /cometchat/cometchatjs.php, which is not available to level 0 members. level 0 can access the remaining which are restricted to level 1.

Please help.

Posted: Wednesday Jul 25th, 2012 at 8:37 pm #20248

Raam

Thanks for your help. It is very much appreciated.

Posted: Thursday Jul 19th, 2012 at 10:41 pm #19792

Well, never mind again. It seems like, I could not find solutions to my problems, but the moment I post my question herre…. I find the solution.

I turned off the Open Registeration, not Pro Form Free membership at level 1 works :)

Posted: Thursday Jul 19th, 2012 at 8:24 am #19754

Never mind. It is working.

I was creating Paid Premium Membership and Free Registration Page, all on one page. Spliting them two separate page works.

Posted: Tuesday Jul 17th, 2012 at 5:16 pm #19561

@Eduan

Thanks a lot for the help. Complete URI did the trick. The level 0 now gets redirected to s2Member’s upgrade page.

Posted: Tuesday Jul 17th, 2012 at 4:59 pm #19560

Thanks Eduan.

Let me try it.

Posted: Tuesday Jul 17th, 2012 at 6:45 am #19477

Raam,

Thanks for your help. I tried restricting level 0 to /members/
and level 1 to
/members/?pid=3
/members/?pid=4
/members/?pid=11
/members/?pid=14

A level 0 user can access some of the features which are allowed to level 1 only.

Can I use full URI at level 1 e.g. /members/?pid=14&pagetitle=my_email&message_template=compose? I have not tried it yet.

Posted: Monday Jul 16th, 2012 at 4:12 pm #19409

/member/? did not work. Is ? not a RegEx which is not allowed in URI Access Restriction?

If /member/? can be used then I would have used /members/?pid=14 and /members/?pid=13 etc for level 1, which would make life much easier.

Posted: Monday Jul 16th, 2012 at 1:08 pm #19380

I was browsing for my solution to my answer.
HOw about install exec-php and use the following php code?

<div id="login"> 
 
        <!-- Content to be shown if logged in --> 
        <?php if ( is_user_logged_in() ) { ?> 
 
            <!-- Display Username / if logged in --> 
            <p class="logn-text-top">Welcome, <?php echo $current_user->user_login; ?></p> 
 
        <!-- Content to be shown if not logged in -->    
        <?php } else { ?> 
 
            <a href="#"><p class="login-text-top">Login Now<span>></span></p></a> 
 
        <?php } ?> 
 
        </div> 
Posted: Monday Jul 16th, 2012 at 8:02 am #19350

Hi Cristian, Thanks for reply. Yes, I know it is under Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions.
Perhaps I did not explain the question.
I want level 0 to access only /member/ but not anything else under /member/

That is I want level 0 to have access to
/member/

but level 0 cannot have access to

/members/?pid=13&pagetitle=trending
/members/?pid=14&pagetitle=my_email&message_template=compose
/members/?pid=14&pagetitle=my_email&message_template=inbox
/members/?pid=4&pagetitle=album
/members/?pid=4&pagetitle=photo

This is what I entered for level 0

/member/

and for level 1 I entered
trending
compose
inbox
album
photo

Viewing 14 replies - 26 through 39 (of 39 total)

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.