-
Author
-
January 21, 2014 at 02:24 #9997studiblogParticipant
My membership restrictions are not working anymore. I have a free membership level and in sweetdate–> membership i set everything to “restrict to 1)not logged in, 2) not members”
so far so right? a week ago everything worked perfectly. guests were redirected to /registration
But you can see profile pages even if you’re not logged in now 🙁
Here is the code from sweetdate-child, functions.php, maybe i changed sth. accidently.COPY CODE<?php /** * @package WordPress * @subpackage Sweetdate * @author SeventhQueen <themesupport@seventhqueen.com> * @since Sweetdate 1.0 */ /** * Sweetdate Child Theme Functions * Add extra code or replace existing functions */ /* Filter the redirect url for login*/ add_filter("login_redirect","kleo_redirect_to_profile",100,3); function kleo_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user){ /*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/ if(!is_super_admin($user->ID)) return bp_core_get_user_domain($user->ID ); else return $redirect_to_calculated; /*if site admin*/ } // Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else { $profilelink = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '" rel="nofollow">' . __('Profile') . '</a></li>'; $menu = $menu . $profilelink; return $menu; } } add_action('user_register', 'kleo_pmpro_default_level'); function kleo_pmpro_default_level($user_id) { pmpro_changeMembershipLevel(1,$user_id); } // redirect to registration page instead of membership levels page add_filter('kleo_pmpro_url_redirect', 'my_custom_redirect'); function my_custom_redirect() { if (is_user_logged_in()) { return pmpro_url("levels"); } else { return bp_get_signup_page(); } } ?>
January 21, 2014 at 02:37 #9998studiblogParticipantok i figured sth. out:
i changed the .htaccess so that the site is redirected to https://
now i changed the htaccess to default and tried with http:// unfortunately the membership restriction works only with http://
how can i change this?
i changed the .htaccess like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect auf https://…, falls Port != 443
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
# Redirect auf index.php, falls Path = /
RewriteBase /
RewriteRule ^index\.php$ – [L]
# Redirect auf index.php, wenn Datei oder Verzeichnis nicht existiert
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressJanuary 23, 2014 at 01:58 #10079Pat2013ParticipantI have the same problem with restrictions unfortunately. It would be great to know how to fix this.
January 24, 2014 at 11:36 #10156AbeKeymasterHi @studiblog,
Please give us access to your ftp server to do some tests.
Mark the reply as privateHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 24, 2014 at 11:37 #10157AbeKeymasterHi @Pat2013, Your problem is related to HTTPS also?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 25, 2014 at 03:05 #10205Pat2013ParticipantI have problems with memberships restrictions since i have https installed but i couldn’t find how to solve it. I don’t know if it’s related to https 100%, but it seems that it stopped working after installing ssl. It was the only change i did to the site.
January 27, 2014 at 17:24 #10320AbeKeymasterHello guys, please replace this file contents
wp-content\themes\sweetdate\framework\helpers.php
with this
https://archived.seventhqueen.com/files/helpers.txtThis was related to the port when using ssl being different that the wordpress configured link. All good now
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.