Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-21 18:27:49

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

cbe_members: Extends cbe_frontauth

This has been for awhile in the pipe and seems to finally come out: changing and resetting passwords are now possible from frontend.

This plugin hooks into cbe_frontauth, minimum version 0.9.

Install, activate. Period.

Brief help, download at the same place (or directly: normal, gzipped)

— Changelog:

  • 28 Mar 12 – va.1.2 – Fix: missing include for password generation
  • 21 Mar 12 – va.1 – Change and reset password features

Last edited by CeBe (2012-03-28 13:55:35)

Offline

#2 2012-03-28 13:03:30

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: cbe_members: Extends cbe_frontauth

Bonjour Claire,

I’m trying to use your plugin – I have the lastest version of frontauth 0.9.1

I’m getting a fatal error calling generate_password() on line 280.

I think you need to include these files before calling the password function.

include_once txpath . '/lib/txplib_admin.php';
include_once txpath . '/include/txp_auth.php';

Then it worked for me, I got the email and new password but I can’t login with the new password.
I’ll try playing with it again, later.

Last edited by geoff777 (2012-03-28 13:23:02)


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#3 2012-03-28 13:50:27

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_members: Extends cbe_frontauth

geoff777 a écrit:

I’m getting a fatal error calling generate_password() on line 280.

(blush) Stupid me >_< Forgot to disable all other plugins before testing.
Thanks for pointing this out.
Fixed in va.1.2 (still alpha)

I can’t login with the new password.

What version of Textpattern do you use ? Mine is 4.4.1

Offline

#4 2012-03-28 13:56:08

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: cbe_members: Extends cbe_frontauth

Hi Claire

Yes I use 4.4.1


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#5 2012-03-28 14:14:32

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_members: Extends cbe_frontauth

Strange… I’ve just tried on my site and it works (but you can’t see it by yourself because it mails the new password to me).
Maybe an idea : check that the password is reset only once in the page, i.e. if you use cbe_frontauth in another place, make sure you set show_reset="0"

Offline

#6 2012-05-06 15:43:08

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: cbe_members: Extends cbe_frontauth

I don’t quite understand how this plugin is working. When it’s activated, users are presented with an option to change their password when logged in. Sweet. But this is the code that gets produced:

Change Your Password<br /><form action="/customer/?change=1" method="post">
<label for="password">Password</label><input type="password" value="" name="p_password" class="edit" id="password" />
<label for="new_password_1">New password</label><input type="password" value="" name="p_password_1" id="new_password_1" />
<label for="new_password_2">New password</label><input type="password" value="" name="p_password_2" id="new_password_2" />
<input type="submit" value="Change Your Password" class="publish" />
<input type="hidden" value="cbe_fa_before_logout" name="step" />
</form>

Are there options to control the markup here? This is quite difficult to style.

Also … how is the link to change the password generated? Can I control where/how it appears?

Last edited by kevinpotts (2012-05-06 16:05:20)


Kevin
(graphicpush)

Offline

#7 2012-05-06 16:33:51

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_members: Extends cbe_frontauth

This plugin is in an embryonic state, it just displays links and forms.
I know it could be much much much better, and it probably will.

Offline

#8 2012-08-29 07:26:06

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: cbe_members: Extends cbe_frontauth

I know that this is “embryonic”, but is there any capacity to specify where the change password form appears on the page?

At the moment, as soon as I activate the plugin it displays in the navigation bar where my login info is (name and logout link) – even without adding any extra tags – but of course this completely messes with the layout.

What I really want to achieve to be able to have it display on a web page, which the user can find through a menu item in the navigation bar.

Offline

#9 2013-02-07 14:48:43

senorniles
New Member
From: Dallas
Registered: 2009-10-21
Posts: 2

Re: cbe_members: Extends cbe_frontauth

If you edit the plugin source “cbe_members” and search for “wraptag” you can change the wrapping element for the “Change Password” link that gets generated. I changed all 3 instances I found from p to li. Hope that helps!

Offline

#10 2014-07-02 11:41:03

MrPS
Member
Registered: 2011-11-09
Posts: 34

Re: cbe_members: Extends cbe_frontauth

Hi Claire.

How do I wrap the text in a paragraph (<p> tag), derived from the code, at the bottom of cbe_members?

// -- Resets/changes password and mails it
// -------------------------------------------------------------------
function _cbe_mb_set_author_pass( $new_pass, $name, $email, $return_url, $givenid=null )
{
    $hash = doSlash(txp_hash_password($new_pass));
    $givenid = ($givenid == null ? $name : $givenid) ;
    if( safe_update( 'txp_users', "pass = '$hash'", "name = '".doSlash($name)."'" ) )
        $out = _cbe_mb_gTxt( _cbe_mb_send_new_password( $new_pass, $email, $name, $return_url, $givenid )
                           ? 'password_sent_to'
                           : 'could_not_mail' )
             . ' ' . $givenid ;
    else
        $out = _cbe_mb_gTxt('could_not_update_author').' '.htmlspecialchars( $givenid ) ;
    return( $out ) ;
}

Offline

#11 2014-07-02 12:12:12

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_members: Extends cbe_frontauth

Hi MrPS,

Maybe something like

graf( $out ) ;

just before the return?

Or, if you want to add some attributes (like a class, or a title, or anything else):

graf( $out, ' class="msg-class"' ) ;

(notice the blank before class)

Offline

#12 2014-07-02 12:43:15

MrPS
Member
Registered: 2011-11-09
Posts: 34

Re: cbe_members: Extends cbe_frontauth

Thank you for the fast respond.

It doesn`t seem to work. I basically just want the messages derived from the following code, to be wrapped in a <p> tag.

       ? 'password_sent_to'
             : 'could_not_mail' )
             . ' ' . $givenid ;

Offline

Board footer

Powered by FluxBB