Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#625 2008-09-01 21:27:06

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: ign_password_protect

dreamer, look at your line <txp:ign_if_logged_in privs="1,2,3,4,5,6,7">. Spotting the missing thing? Yes, userlevel numbers. As the none level is 0 (zero).

Offline

#626 2008-09-01 21:28:59

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: ign_password_protect

ah, I thought None was set to 7. thx.

Offline

#627 2008-09-02 21:56:33

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: ign_password_protect

using a user with a privilege set to “none” won’t allow me to log into the password protected area.In fact, it seems that a user with “none” can’t log into the TXP admin interface either. Is there something else that I need to do?

Offline

#628 2008-09-02 22:12:13

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

No, a user with priveleges set to NONE cannot log into the admin area. More accurately, a user with priveleges set to none can technically log in, but there are no areas that a user with privs set to none can see, so it’s effectively the same thing.

You can EITHER explicitly allow user with Privs NONE access by including 0 in the privs string, or leave off the privs string entirely. That effectively says “Allow any valid user / password combo access to this content”


And then my dog ate my badger, and the love was lost.

Offline

#629 2008-09-03 06:06:37

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: ign_password_protect

Hi igner, a quick question – will the latest update include a search ability? I really need to search by realname/email/login. Thanks!

Offline

#630 2008-09-03 06:16:24

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

I’ll see what I can work in. The user management UI really needs a lot of help in general, and needs to be reworked. Adding in search could certainly be part of that.


And then my dog ate my badger, and the love was lost.

Offline

#631 2008-09-03 19:12:46

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: ign_password_protect

igner wrote:

No, a user with priveleges set to NONE cannot log into the admin area. More accurately, a user with priveleges set to none can technically log in, but there are no areas that a user with privs set to none can see, so it’s effectively the same thing.

You can EITHER explicitly allow user with Privs NONE access by including 0 in the privs string, or leave off the privs string entirely. That effectively says “Allow any valid user / password combo access to this content”

actually, i think it has something to do with my Firefox 3 browser on my desktop instead. I just tried logging into the password area on Windows Safari and IE6 and both worked fine. I have cookies enabled under my Privacy tab under Tools so it’s not that….at least I dont’ think it is.

It also worked fine in FF3 on my laptop.

Thoughts?

PS. I tried logging in using various users with various privileges and none could work on FF3 desktop.

Last edited by dreamer (2008-09-03 19:34:27)

Offline

#632 2008-09-08 19:49:57

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: ign_password_protect

For whatever reason, I no longer have this issue.

New question:
I’m trying to get the site to return to another part of the site upon logging out. I can’t seem to make sense of the directions for the return_path attribute. Can someone clarify how this is to be done;

This is what my code looks like;

<txp:ign_if_logged_in privs="0,1,2,3,4,5,6">
       <txp:ign_show_login show_logged="1" remember="1" />
           <txp:ign_logout_link>return_path="http://www.mydomain.com"</txp:ign_logout_link>
        <txp:file_download_list form="files" label="Downloads" limit="999" sort="filename desc" wraptag="ul" />
         <txp:else />
         <txp:ign_show_login />
   </txp:ign_if_logged_in>

Last edited by dreamer (2008-09-08 19:54:26)

Offline

#633 2008-09-09 20:43:57

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

dreamer – the correct syntax would be:

<txp:ign_logout_link return_path="http://www.mydomain.com"> Text for the logout link </txp:ign_logout_link>

or if you want to use the default logout link text, you can use it as a self-closing tag:

<txp:ign_logout_link return_path="http://www.mydomain.com" />

Relative paths will also work.

Please note that as of right now, the return_path must be on the local site in order to actually log the user out. It’s on my todo list to change that behaviour and allow redirects offsite as well.


And then my dog ate my badger, and the love was lost.

Offline

#634 2008-09-09 21:44:56

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: ign_password_protect

Igner- I implemented that syntax. However, for some reason, it logs out to the login page as opposed to a designated page/url that is on the site itself.

I suppose this is better than what I had before, which was that it would log me out and direct me to the homepage.

Thoughts?

Offline

#635 2008-09-10 19:14:14

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

yeah, I think you’re the first one to actually use the return_path attribute, and that you discovered an undocumented feature.

You can fix this by finding the following line (around line 1588):
if(!empty($return_path)) list($return_path) = explode('?', $_SERVER['REQUEST_URI']);

and replace with:

list($return_path) = (!empty($return_path)) ? explode('?', $return_path) : explode(?', $_SERVER['REQUEST_URI']);

That should solve the problem for you.


And then my dog ate my badger, and the love was lost.

Offline

#636 2008-09-10 19:26:25

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: ign_password_protect

igner, sorry to ask you for a lot, but just occurred to me – would it be possible to have a multi-select option in the next or future version? Something like the articles tab. Thing is, I have hundreds of users, and would like to select all the users who have registered but never logged in. Its a bit of a pain manually.

Offline

Board footer

Powered by FluxBB