Renamed function so it might be more understandable
[mailer.git] / inc / modules / login.php
index 82ef10b897e54205f670010f4370414b267bfb70..fca747b2badeb4f810bcf4945186028a5ff78c96 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/15/2003 *
- * ===============                              Last change: 04/18/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 10/15/2003 *
+ * ===================                          Last change: 04/18/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : login.php                                        *
  * $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                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -40,9 +39,8 @@
 if (!defined('__SECURITY')) {
        die();
 } elseif (!isMember()) {
-       $URL = 'modules.php?module=index';
-       if (checkModulePermissions('login') == 'mem_only') $URL .= '&amp;code=' . getCode('MODULE_MEM_ONLY') . '&amp;mod=' . getModule();
-       redirectToUrl($URL);
+       // Redirect to login form with displayed error code
+       redirectToUrl('modules.php?module=index&amp;what=login&amp;code=' . getCode('MODULE_MEMBER_ONLY') . '&amp;mod=' . getModule());
 } // END - if
 
 // Disable block mode by default
@@ -66,7 +64,7 @@ if (!isActionSet()) {
 
 // Add the member's menu here...
 if ((getConfig('member_menu') == 'Y') || (!isExtensionActive('sql_patches', true))) {
-       addMenu('member', getModeAction('member', getWhat()), getWhat());
+       addMenu('member', getActionFromModuleWhat('member', getWhat()), getWhat());
 } // END - if
 
 // Disable block-mode again