]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-confirm.php
More rewrites to use EL code
[mailer.git] / inc / modules / guest / what-confirm.php
index a97110740193836eac1601b5d051ba1ba29b3be0..9437acbf4ca729f8263a45d318a72f66459f7e0d 100644 (file)
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -43,45 +41,19 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('guest', __FILE__);
+addYouAreHereLink('guest', __FILE__);
+
+if ((!isExtensionActive('user')) && (!isAdmin())) {
+       displayMessage(generateExtensionInactiveNotInstalledMessage('user'));
+       return;
+} // END - if
 
 if (isGetRequestParameterSet('hash')) {
        // 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');