]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-login.php
More wrapper functions used, removed bigintval() which caused a lot trouble
[mailer.git] / inc / modules / guest / what-login.php
index e888b2cbbb076e89571c46c7ea2043a801b36b43..ca302631056a3bd4f20318ca18e2e28bf22656e0 100644 (file)
@@ -15,8 +15,6 @@
  * $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                    *
@@ -41,7 +39,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('guest', __FILE__);
@@ -74,7 +72,16 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) {
 } elseif (isPostRequestParameterSet('new_pass')) {
        // New password requested
        $userid = '0';
-       if ((isPostRequestParameterSet('id')) && (postRequestParameter('id') > 0)) $userid = bigintval(postRequestParameter('id'));
+       if (isPostRequestParameterSet('id')) {
+               // Do we have nickname or userid?
+               if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) {
+                       // Nickname entered
+                       $userid = SQL_ESCAPE(postRequestParameter('id'));
+               } else {
+                       // Direct userid entered
+                       $userid  = bigintval(postRequestParameter('id'));
+               }
+       } // END - if
 } else {
        // Not logged in
        $userid = '0'; $hash = '';
@@ -114,7 +121,7 @@ if (!empty($errorCode)) {
        // @TODO Move this HTML code into a template
        $content['message'] = '<tr>
   <td colspan="4" align="center">
-    <span class="guest_failed">' . getMessageFromErrorCode($errorCode) . '</span>
+    <span class="notice">' . getMessageFromErrorCode($errorCode) . '</span>
   </td>
 </tr>';
 } // END - if