./inc/libs/user_functions.php:327: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
./inc/libs/user_functions.php:347: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
./inc/libs/user_functions.php:423: // @TODO We should try to rewrite this to fetchUserData() somehow
-./inc/libs/user_functions.php:609: // @TODO Try to rewrite the following unset()
+./inc/libs/user_functions.php:611: // @TODO Try to rewrite the following unset()
./inc/libs/yoomedia_functions.php:116: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
./inc/load_config.php:77: // @TODO Rewrite them to avoid this else block
./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php *
loadTemplate('admin_settings_saved', false, $content['message']);
}
+// Does resend the user's confirmation link for given email address
+function doResendUserConfirmationLink ($email) {
+ // Confirmation link requested
+ if (fetchUserData($email, 'email')) {
+ // Email address found
+ $content = getUserDataArray();
+
+ // Detect status
+ switch ($content['status']) {
+ case 'UNCONFIRMED': // Account not confirmed
+ // Load email template
+ $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']);
+
+ // Send email
+ sendEmail($email, '{--REQUEST_CONFIRM_LINK_SUBJECT--}', $message);
+
+ // And set message
+ $content['message'] = '{--CONFIRM_LINK_SENT--}';
+ break;
+
+ case 'CONFIRMED': // Account already confirmed
+ $content['message'] = '{--LOGIN_ID_CONFIRMED--}';
+ break;
+
+ case 'LOCKED': // Account is locked
+ $content['message'] = '{--LOGIN_ID_LOCKED--}';
+ break;
+ } // END - switch
+ } else {
+ // Email address not registered
+ $content['message'] = '{--EMAIL_404--}';
+ }
+}
+
// Expression call-back function for fetching user data
function doExpressionUser ($data) {
// Use current userid by default
// Do user account confirmation
doConfirmUserAccount(getRequestParameter('hash'));
} elseif ((isFormSent()) && (isPostRequestParameterSet('email'))) {
- // Confirmation link requested 0 1 2
- if (fetchUserData(postRequestParameter('email'), 'email')) {
- // Email address found
- $content = getUserDataArray();
-
- // Detect status
- switch ($content['status']) {
- case 'UNCONFIRMED': // Account not confirmed
- // Load email template
- $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']);
-
- // Send email
- sendEmail(postRequestParameter('email'), '{--REQUEST_CONFIRM_LINK_SUBJECT--}', $message);
-
- // And set message
- $content['message'] = '{--CONFIRM_LINK_SENT--}';
- break;
-
- case 'CONFIRMED': // Account already confirmed
- $content['message'] = '{--LOGIN_ID_CONFIRMED--}';
- break;
-
- case 'LOCKED': // Account is locked
- $content['message'] = '{--LOGIN_ID_LOCKED--}';
- break;
- } // END - switch
- } else {
- // Email address not registered
- $content['message'] = '{--EMAIL_404--}';
- }
-
- // Load template
- loadTemplate('admin_settings_saved', false, $content['message']);
+ // Resend confirmation link
+ doResendUserConfirmationLink(postRequestParameter('email'));
} else {
// No hash found, the guest may want to enter his email address to re-get his confirmation link?
loadTemplate('guest_confirm_link');