You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two EE hooks that relate to users changing their password: cp_member_reset_password in ee/legacy/controllers/cp/login.php and member_process_reset_password in ee/ExpressionEngine/Addons/member/mod.member_auth.php
The first passes no information to the hook when it fires
/* -------------------------------------------
/* 'cp_member_reset_password' hook.
/* - Additional processing after user resets password
/* - Added EE 2.9.3
*/
$this->extensions->call('cp_member_reset_password');
if ($this->extensions->end_script === true) {
return;
}
/*
/* -------------------------------------------*/
The second passes the member_id of the user whose password has changed.
/* -------------------------------------------
/* 'member_process_reset_password' hook.
/* - Additional processing after user resets password
/* - Added EE 2.9.3
/* - Member ID parameter added 4.0.0
*/
if (ee()->extensions->active_hook('member_process_reset_password') === true) {
$data = ee()->extensions->call('member_process_reset_password', $data, $member_id_query->row('member_id'));
if (ee()->extensions->end_script === true) {
return;
}
}
/*
/* -------------------------------------------*/
It would seem that anything that wants to do something after the user changes their password would need to respond to both these hooks ... but the absence of $member_id from the first hook makes this more complex - as the affected $member_id needs to be deduced some other way.
Am I missing something about why one hook includes $member_id and the other doesn't?
EE 7.4.9
php 8.3
The text was updated successfully, but these errors were encountered:
jcogs-design
changed the title
CP/Sidebar AddItem() method adds URL to link even if none specified
Ignore this one ... 🐾
May 10, 2024
jcogs-design
changed the title
Ignore this one ... 🐾
member_process_reset_password and cp_member_reset_password hooks pass different information when firing ... why?
May 10, 2024
There are two EE hooks that relate to users changing their password:
cp_member_reset_password
inee/legacy/controllers/cp/login.php
andmember_process_reset_password
inee/ExpressionEngine/Addons/member/mod.member_auth.php
The first passes no information to the hook when it fires
The second passes the member_id of the user whose password has changed.
It would seem that anything that wants to do something after the user changes their password would need to respond to both these hooks ... but the absence of
$member_id
from the first hook makes this more complex - as the affected $member_id needs to be deduced some other way.Am I missing something about why one hook includes $member_id and the other doesn't?
EE 7.4.9
php 8.3
The text was updated successfully, but these errors were encountered: