Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-30 22:28:41

kirito
Member
From: Italy
Registered: 2017-01-10
Posts: 34

mck_login: does the reset feature work? How?

Hello, I’m moving a blog to a new hosting (OVH). On this blog was implemented self registering, self change password and self reset on public side, with cbe_frontauth and mem_self_register. Well, I don’t know why, but on the new host the mails from mem_self_register are not sent: it seems that Dragondz managed to make it work (forum.textpattern.com/viewtopic.php?pid=322664#p322664) but I don’t understand what and where I have to change.

Now I decided to try mck_login, which Stef recommended to me a few years ago. Adding the string include_once txpath.'/lib/txplib_admin.php'; in the functions that use txp_validate (as I did read in another post) is a start. Registering new users does work.
But I really can not make the reset password link to work. The plugin should send you an e-mail with a link: click the link with a random number in it and “somehow” another e-mail should be sent with the new random generated password. The first e-mail arrives, but the link (with the ?mck_reset=[randomnumbers]) just opens the home page and nothing happens. How is it supposed to work?

Here is a fork that I made of the old repository: github.com/gas-kirito/mck_login
Any help is appreciated. Thanks in advance and Happy New Year! :)

EDIT: Wrong include_once library. Fixed. Sorry.

Last edited by kirito (2020-12-31 07:35:21)

Offline

#2 2020-12-31 07:41:07

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,391
Website Twitter

Re: mck_login: does the reset feature work? How?

Hi Kirito

I think if i remember well that the code i used in my problem is txp code used in txpMail, have you tryed my code directly into txp page or article to test if sending email working ? (check in txp preference that you have activated php in page and articles)

<txp:php>
try {
			$message = Txp::get('\Textpattern\Mail\Compose')
					->from('admin@xxx.xx', 'Xxx')
					->to($to)
					->subject($subject)
					->body($msg);
			$message->replyTo('admin@xxx.xx');
			$message->bcc('info@xxx.xx');
			$message->send();
	} catch (\Textpattern\Mail\Exception $e) {
			return false;
	}
	return true;
</txp:php>

Dont forget to change admin@xxx.xx and info@xxx.xx with real email.

Cheers.

Offline

#3 2020-12-31 13:01:28

kirito
Member
From: Italy
Registered: 2017-01-10
Posts: 34

Re: mck_login: does the reset feature work? How?

Other emails are sent (ie. if I register a new user from the admin side) and a public form to send messages to the admin is in place which use phpmailer and works. I’m lost…

Offline

#4 2020-12-31 14:17:50

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,391
Website Twitter

Re: mck_login: does the reset feature work? How?

Hi,

it s suitable to discuss in one thread, then we continue to discuss this in the other thread.

Happy new year.

Offline

Board footer

Powered by FluxBB