Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#649 2008-10-22 06:00:47

SmaLL75
New Member
Registered: 2008-10-22
Posts: 1

Re: ign_password_protect

Hi, all!

Tell me please, can i be registered in plug-in “ign_password_protect” and simultaneously in system TXP ?

thanks.

Offline

#650 2008-11-04 14:31:28

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: ign_password_protect

Two questions:

1.) If my user logs out and the URL changes to /?logout=1 then I can’t log back in, because you’d logging into the logout action, so what do I need to change the form action to? It is currently set to <txp:page_url />

2.) If my user uses an incorrect username/password, it will just reshow the form, how can I get an error, saying username/password entered was incorrect?

Thank you

Last edited by driz (2008-11-04 16:53:44)


~ Cameron

Offline

#651 2008-11-27 21:13:39

eggnog
Member
From: Vancouver
Registered: 2008-03-10
Posts: 37
Website

Re: ign_password_protect

* Edited

Last edited by eggnog (2008-11-28 17:06:30)

Offline

#652 2008-12-24 16:12:25

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: ign_password_protect

This has probably been asked or answered but it would take me all day to read this thread…

Will this plugin:
- allow my site admins to add users who have no access to the admin interface, but just get to see the /members section while non-members do not?
- allow users to register themselves (we don’t want them to—it’s an IRL organization so members need to be added by the admins)?
- have some sort of admin-side interface for managing members?

And is there some sort of a step-by-step tutorial page out there, or a page with lots of examples?



WebKat

Offline

#653 2008-12-24 19:42:54

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: ign_password_protect

OpalCat wrote:

Will this plugin:
- allow my site admins to add users who have no access to the admin interface, but just get to see the /members section while non-members do not?

Yes.

- allow users to register themselves (we don’t want them to—it’s an IRL organization so members need to be added by the admins)?

It can but you don’t have to use tags to set up self registration. Use a ZCR form to have members apply to the admins for access to the MO area of the site.

- have some sort of admin-side interface for managing members?

Yes, similar to the TXP admin user admin site module. Note that the passwords email facility doesn’t work with hosts such as Mosso that require more fully qualified email headers. There is a hack for that if you need it.

And is there some sort of a step-by-step tutorial page out there, or a page with lots of examples?

Sorry, not aware of any but it’s not difficult to implement.

Merry Christmas :-)

Offline

#654 2009-01-06 16:02:55

quemultimedia
Member
From: Nairobi
Registered: 2008-12-31
Posts: 42
Website

Re: ign_password_protect

Guys,

Pardon me – this may have already been asked, and already answered – within this l o o o o o n g forum.

When using @<txp:ign_show_login /> is it possible to show a, ‘register now’ link? So far, I can only see the Username and Password fields. How can I achieve this [I would like to show a ‘register now’ link at the bottom of the form].

Any pointers?


Que,
Que-Multimedia

Offline

#655 2009-01-06 19:50:12

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

Re: ign_password_protect

quemultimedia wrote:

Guys,

Pardon me – this may have already been asked, and already answered – within this l o o o o o n g forum.

When using @<txp:ign_show_login /> is it possible to show a, ‘register now’ link? So far, I can only see the Username and Password fields. How can I achieve this [I would like to show a ‘register now’ link at the bottom of the form].

Any pointers?

look in the documentation of the plugin for some basic pointers on using a TXP form for the login form. You could include a link to your registration form (You’ll probably want to use mem_self_register for that).

Hope that helps.


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

Offline

#656 2009-01-07 23:47:40

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: ign_password_protect

Howdy, folks!

I searched the forum for <txp:ign_current_user /> and wraptag, and couldn’t find anything that addressed this.

I’m using ign_password_protect v0.5b9, and I want to display a greeting for logged in users. Here is what I have in Texpattern language:

<h2>Hola, <txp:ign_current_user wraptag="" />!</h2>

This generates the following markup:

<h2>Hola, <div class='active'>
 <p>John Stephens<br />
 <a href='?logout=1'alt='Logout'title='Logout'>Log out</a></p>
</div>!</h2>

What I expected was something like this:

<h2>Hola, John Stephens!</h2>

How can I get the “realname” without any additional markup? The Plugin’s help is great, but I couldn’t find this in the documentation for this tag.

Thanks!

Offline

#657 2009-01-08 00:22:35

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

Re: ign_password_protect

@johnstephens – taken from the docs:

Attributes:
form The name of a TXP form to use to render the login form. Defaults to “current_user”; if form doesn’t exist or no form is found, renders a generic form.

and here is that generic form:

<div class='active'> <p><txp:ign_user_info type="realname" /><br /> <txp:ign_logout_link>Log out</txp:ign_logout_link></p> </div>

So, to get the result you wanted, create a form, we’ll call it johns_current_user, and the contents should be

<h2>Hola, <txp:ign_user_info type="realname" /></h2>

Then in your page, form, or article, insert <txp:current_user form="johns_current_user" /> and you’ll get what you expected.


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

Offline

#658 2009-01-30 21:53:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,476
Website GitHub

Re: ign_password_protect

This is a damn fine plugin, igner. Never really grasped its full power till now, when I’ve had to use it in anger on a site for a complete client-side article/user management system. It rocks.

But I’m struggling with one thing; apologies if this has been covered — I couldn’t find an answer. If I want to detect if a user has no privileges (i.e. privs=“0”) and kick them off the system or refuse them entry, how is best to do it?

Using:

<txp:ign_if_logged_in privs="0"> ... </txp:ign_if_logged_in>

is fine but they are still technically “logged in”. Thus, even though I can very easily show them no content or rude messages, I would rather do one of two things:

  1. Automatically log them out and show them a message like “account suspended” (preferable)
  2. Make it appear as if the login failed, by showing an “account suspended” message and another login box

I don’t know how to approach Method #1, or if it is even possible. Perhaps some PHP trickery and/or an auto-page-refresh with ?logout=1 appended? But how would I then display an appropriate message?

I’ve tried method #2. I can show the message easily enough, but I can’t seem to show a login box while they are logged in: <txp:ign_show_login /> returns nothing for logged-in users, even ones that can’t do anything!

Has anyone any nuggets of wisdom that might help me out in either case? Thanks in advance.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#659 2009-01-30 22:24:14

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

Re: ign_password_protect

This is a damn fine plugin, igner. Never really grasped its full power…

Thanks, Bloke.

Just so as to have the notion clear, you’re looking for the ability to disable an account without deleting it, correct?

Redirect on login or failed login – I’ll have to mull that one over. I know I’ve looked at it in the past, but being an old man, I don’t remember what I discovered.

As for #2, IF you set show_logged to true, it will pass any provided attributes to ign_current_user – so you could specify a specific form for the current_user if the user’s logged in, but has no privs. (I think, it’s been 6 months since I’ve been in that code…). Try that, and I’ll look at the source this weekend and see if I can come up with an alternative for 1.

Last edited by igner (2009-01-30 22:24:58)


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

Offline

#660 2009-01-31 09:27:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,476
Website GitHub

Re: ign_password_protect

igner wrote:

you’re looking for the ability to disable an account without deleting it, correct?

Yes, the act of an administrator setting an account to privs level 0 (in this case) means that the account is suspended and the user should not be ‘allowed’ to log in to the client side. By “allowed” I don’t mind if that is done:

  1. So they are actually allowed to log in but it’s possible via some tag trickery to make it look like they’re not (e.g. show another login box)
  2. By some mechanism to deny access to certain priv levels regardless of whether they enter the correct user/password
  3. Via a simple redirect to a “sorry” page (or show a “sorry” message) if their priv levels are in the “sod off” list
  4. With some other clever trick

Redirect on login or failed login – I’ll have to mull that one over.

Thanks, man. Much appreciated. Any way you can think of to show some error and prevent them gaining access would be terrific.

As for #2, IF you set show_logged to true, it will pass any provided attributes to ign_current_user – so you could specify a specific form for the current_user if the user’s logged in, but has no privs. (I think, it’s been 6 months since I’ve been in that code…)

Aha, that might do the trick. I’ll give it a go later, thanks for the tip.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

Board footer

Powered by FluxBB