mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
related to #2158 update user and guest pop in
- Implementation of a new modal for modifying a user or guest - Addition of a function to allow plugins to add a tab to the new user modal - Fix bug: "badger-number" is updated when a user is added or deleted - Fix bug: When the user who is editing has permissions to delete the user he is modifying, the delete icon is now displayed correctly - Added a new api method for modifying the main user and generating a link to reset a password - Passed $conf[‘webmaster_id’] in database configuration
This commit is contained in:
parent
158e99573b
commit
27cd5cde9e
26 changed files with 2144 additions and 467 deletions
|
@ -1004,6 +1004,43 @@ function pwg_send_mail_test($success, $mail, $args)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate content mail for reset password
|
||||
*
|
||||
* Return the content mail to send
|
||||
* @since 15
|
||||
* @param string $username
|
||||
* @param string $reset_password_link
|
||||
* @param string $gallery_title
|
||||
* @return string mail content
|
||||
*/
|
||||
function pwg_generate_reset_password_mail($username, $reset_password_link, $gallery_title)
|
||||
{
|
||||
set_make_full_url();
|
||||
|
||||
$message = l10n('Someone requested that the password be reset for the following user account:') . "\r\n\r\n";
|
||||
$message.= l10n(
|
||||
'Username "%s" on gallery %s',
|
||||
$username,
|
||||
get_gallery_home_url()
|
||||
);
|
||||
$message.= "\r\n\r\n";
|
||||
$message.= l10n('To reset your password, visit the following address:') . "\r\n";
|
||||
$message.= $reset_password_link;
|
||||
$message.= "\r\n\r\n";
|
||||
$message.= l10n('If this was a mistake, just ignore this email and nothing will happen.')."\r\n";
|
||||
|
||||
unset_make_full_url();
|
||||
|
||||
$message = trigger_change('render_lost_password_mail_content', $message);
|
||||
|
||||
return array(
|
||||
'subject' => '['.$gallery_title.'] '.l10n('Password Reset'),
|
||||
'content' => $message,
|
||||
'email_format' => 'text/plain',
|
||||
);
|
||||
}
|
||||
|
||||
trigger_notify('functions_mail_included');
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue