/**
  * The Main Action Function
  *
  * Does actions required at initialization
  * prior to headers being sent.
  *
  * @since 0.1 
  *
  * @global string $wpmem_a the action variable also used in wpmem_securify
  * @global string $wpmem_regchk contains messages returned from $wpmem_a action functions, used in wpmem_securify
  */
 function wpmem()
 {
     global $wpmem_a, $wpmem_regchk;
     $wpmem_a = isset($_REQUEST['a']) ? trim($_REQUEST['a']) : '';
     switch ($wpmem_a) {
         case "login":
             $wpmem_regchk = wpmem_login();
             break;
         case "logout":
             wpmem_logout();
             break;
         case "register":
             include_once 'wp-members-register.php';
             $wpmem_regchk = wpmem_registration('register');
             break;
         case "update":
             include_once 'wp-members-register.php';
             $wpmem_regchk = wpmem_registration('update');
             break;
         case "pwdchange":
             $wpmem_regchk = wpmem_change_password();
             break;
         case "pwdreset":
             $wpmem_regchk = wpmem_reset_password();
             break;
     }
     // end of switch $a (action)
 }
 /**
  * The Main Action Function
  *
  * Does actions required at initialization
  * prior to headers being sent.
  *
  * @since 0.1 
  *
  * @global string $wpmem_a the action variable also used in wpmem_securify
  * @global string $wpmem_regchk contains messages returned from $wpmem_a action functions, used in wpmem_securify
  */
 function wpmem()
 {
     global $wpmem_a, $wpmem_regchk;
     $wpmem_a = isset($_REQUEST['a']) ? trim($_REQUEST['a']) : '';
     switch ($wpmem_a) {
         case 'login':
             $wpmem_regchk = wpmem_login();
             break;
         case 'logout':
             wpmem_logout();
             break;
         case 'register':
             include_once 'wp-members-register.php';
             $wpmem_regchk = wpmem_registration('register');
             break;
         case 'update':
             include_once 'wp-members-register.php';
             $wpmem_regchk = wpmem_registration('update');
             break;
         case 'pwdchange':
             $wpmem_regchk = wpmem_change_password();
             break;
         case 'pwdreset':
             $wpmem_regchk = wpmem_reset_password();
             break;
     }
     // end of switch $a (action)
     /**
      * Filter wpmem_regchk.
      *
      * The value of wpmem_regchk is determined by functions that may be run in the wpmem() function.
      * This value determines what happens in the wpmem_securify() function.
      *
      * @since 2.9.0
      *
      * @param  string $wpmem_regchk The value of wpmem_regchk.
      * @param  string $wpmem_a      The $wpmem_a action.
      * @return string $wpmem_regchk Filtered or unfiltered $wpmem_regchk value.
      */
     $wpmem_regchk = apply_filters('wpmem_regchk', $wpmem_regchk, $wpmem_a);
 }
 /**
  * Gets the regchk value.
  *
  * @since 3.0.0
  *
  * @param  string $action The action being done.
  * @return string         The regchk value.
  *
  * @todo Describe regchk.
  */
 function get_regchk($action)
 {
     switch ($action) {
         case 'login':
             $regchk = wpmem_login();
             break;
         case 'logout':
             $regchk = wpmem_logout();
             break;
         case 'pwdchange':
             $regchk = wpmem_change_password();
             break;
         case 'pwdreset':
             $regchk = wpmem_reset_password();
             break;
         case 'register':
         case 'update':
             require_once WPMEM_PATH . 'inc/register.php';
             $regchk = wpmem_registration($action);
             break;
         default:
             $regchk = isset($regchk) ? $regchk : '';
             break;
     }
     /**
      * Filter wpmem_regchk.
      *
      * The value of regchk is determined by functions that may be run in the get_regchk function.
      * This value determines what happens in the wpmem_securify() function.
      *
      * @since 2.9.0
      *
      * @param  string $this->regchk The value of wpmem_regchk.
      * @param  string $this->action The $wpmem_a action.
      */
     $regchk = apply_filters('wpmem_regchk', $regchk, $action);
     // @todo Remove legacy global variable.
     global $wpmem_regchk;
     $wpmem_regchk = $regchk;
     return $regchk;
 }