mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Refactor password reset URL handling and email dispatch.
Added optional parameter to `reset_url` for user-specific handling. Updated email dispatch logic to include dynamic generation of the password reset link with proper placeholder replacements.
This commit is contained in:
@@ -36,12 +36,16 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
||||
/**
|
||||
* Get Reset URL
|
||||
*
|
||||
* @return bool|string
|
||||
* @param int|null $user_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function reset_url() {
|
||||
public function reset_url( $user_id = null ) {
|
||||
static $reset_key = null;
|
||||
|
||||
$user_id = um_user( 'ID' );
|
||||
if ( is_null( $user_id ) ) {
|
||||
$user_id = um_user( 'ID' );
|
||||
}
|
||||
|
||||
delete_option( "um_cache_userdata_{$user_id}" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user