Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hi EdwardS,
A very big thank you for your contribution !
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Great to see the community getting around this plugin, possibly the best txp has seen for community/front end login based sites ever lol :) Thanks Claire and all!!
…………………
I <3 txp
…………………
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hi Claire,
Your recent changes with error messages were a life saver. Do you think you could just borrow mck_login’s error mechamism, which handles multiple scenarios and language packs. Just a thought…
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
After having a look at mck_login, have thought it is now complete (more than cbe_frontauth) and mature, and thinking in terms of complementarity, the logical conclusion is: I strongly suggest that you switch to it to benefit from all its advantages :)
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
I would like to use cbe_frontauth. One of the benefits of cbe that I would love to use is using email as login field. That is a great feature.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Ah… well. It’s just that something else is cooking in my pot. I think it would be faster if Jukka agrees to borrow and adapt lines 757 to 763 :)
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Fair enough… thanks for a great plugin…
Offline
#98 2013-06-27 01:46:59
- EdwardS
- Member
- Registered: 2013-02-23
- Posts: 13
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hi Claire, i have successfully managed to use your plugin to control access to a single page template, if i use it across multiple pages however i have to login multiple times… I’ve been tearing my hair out trying to figure out how to stop this happening, Is there any way around this?
I would have thought after logging in the session would be saved and that would be it?
One of the pages is dynamic so i have headers that stop caching, could that be the reason?
Any help would be greatly appreciated!
This is what i have (truncated):
For the default page:
<txp:cbe_frontauth_if_logged>
<txp:cbe_frontauth_box />
// page information
<txp:else />
<txp:cbe_frontauth_login invite=“Connect”>
</txp:cbe_frontauth_login>
</txp:cbe_frontauth_if_logged>
For the other pages:
<txp:cbe_frontauth_redirect for=“logout” value=“http://www.domain.com” />
<txp:cbe_frontauth_if_logged>
<txp:cbe_frontauth_box />
// page information
<txp:else />
<txp:php>
header(“Location: http://domain.com”, TRUE, 303);
exit;
</txp:php>
</txp:cbe_frontauth_if_logged >
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
I think that the problem is partly here:
EdwardS a écrit:
<txp:cbe_frontauth_redirect for=“logout” value=“http://www.domain.com” />
…
header(“Location: http://domain.com”, TRUE, 303);
These are different domains, therefore different set of cookies.
Chose your domain and stick with it! In addition it is good for SEO.
(BTW: related post)
As stated in the help file, “quick start” paragraph:
- The login/logout mechanism relies on cookies. A cookie is attached to one, and only one, subdomain.
- http://domain.tld and http://www.domain.tld are different subdomains, even if you present the same content through both URLs.
=> You will have to choose which base URL you want to use (with or without www) and stick to it along all the navigation. This is also a good practice to avoid duplicate content.
Here is how to:
- Plugin load order: as it handles redirections, it has to be loaded before any other plugin. Set by default to 4, adjust according to your needs.
- Admin > Preferences : give (or verify) your site URL and save.
- Edit the .htaccess file located at the root of your site, and append as closer as possible to RewriteEngine On (replace domain.tld with your actual URL):
EITHER, with www
RewriteCond %{HTTP_HOST} !^www\.domain\.tld$ [NC]
RewriteRule ^(.*) http://www.domain.tld/$1 [QSA,R=301,L]
OR, without www
RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC]
RewriteRule ^(.*) http://domain.tld/$1 [QSA,R=301,L]
Offline
#100 2013-06-27 20:38:49
- EdwardS
- Member
- Registered: 2013-02-23
- Posts: 13
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
CeBe wrote:
- The login/logout mechanism relies on cookies. A cookie is attached to one, and only one, subdomain.
- http://domain.tld and http://www.domain.tld are different subdomains, even if you present the same content through both URLs.
Legendary. That was my problem. Nice one and keep up the good work. +1000
Offline
#101 2013-11-24 16:39:02
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Is there any way to redirect to homepage after logout from the regular admin panel (that would be www.site.com/textpattern/index.php?logout=1) ? Or is the work of .htaccess rather than the plugin?
Offline
#102 2013-12-03 04:36:39
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
It seems <txp:cbe_frontauth_whois type="name" /> returns nothing immediately after login. Is there someway to debug this? I am using it in a form, displayed by a dashboard tab. The tab is created via smd_tabber and selected as the “Default admin tab” in Preferences.
Refreshing the page makes it work but I can’t expect users to do so.
Any help you can provide is appreciated. It’s a great plugin.
EDIT : When trying to do further debugging I added the following to my form:
<!-- logged in <txp:cbe_frontauth_if_logged> true <txp:else/> false </txp:cbe_frontauth_if_logged> -->
All the cbe tags after that worked. So a simple fix was to add this line at the begging of my form. So consider this an FYI rather than a call for help. I’m in good shape now.
Last edited by MattD (2013-12-03 04:50:09)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#103 2014-02-25 17:14:17
- fiddle
- Member
- Registered: 2007-10-03
- Posts: 87
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hopefully someone can lend a hand in helping me out with some instruction.. I wanted to use the “change password” function, but am not sure how to implement…
This is an example of what I have:
<txp:cbe_frontauth_if_connected>
<txp:else />
<h1>Member Login</h1>
<txp:cbe_frontauth_loginwith value="username" />
<txp:cbe_frontauth_login invite="">
<ol class='login'>
<txp:cbe_frontauth_logname label="Username" wraptag="li" />
<txp:cbe_frontauth_password label="Password " wraptag="li" />
<txp:cbe_frontauth_submit label="Login" wraptag="li" class="submit" />
</ol>
</txp:cbe_frontauth_login>
</txp:cbe_frontauth_if_connected>
<txp:cbe_frontauth_protect>
<h1>Welcome to the Member Area</h1>
<p><txp:cbe_frontauth_link label="Logout" class="btn" link="logout=1" target="_get" /></p>
</txp:cbe_frontauth_protect>
What and were would I insert for the change password feature..???
Let me know if any more info is needed in order to explain..
Thank you very much.........
Fiddle
Last edited by fiddle (2014-02-25 17:18:25)
Offline
#104 2014-02-25 18:06:01
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
fiddle wrote #279245:
I wanted to use the “change password” function, but am not sure how to implement…
Just download and activate cbe_members.
It is not highly developed but should do the job without any other manipulation.
Offline
#105 2014-02-25 18:08:51
- fiddle
- Member
- Registered: 2007-10-03
- Posts: 87
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
By activating the plugin, all i get under my login form is “forget password?”, which I believe is the password reset not the change..?
Thanks
Last edited by fiddle (2014-02-25 18:09:04)
Offline