Welcome Guest, Not a member yet? Register   Sign In
Activation Routes
#6

[eluser]xtremer360[/eluser]
That's great. Are you sure this is all I needed to do?

Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Activation extends CI_Controller {

function __construct()
{
        parent::__construct();
        $this->load->model('users/users_model');
}

    private function _remap()
    {
        $user_id = $this->uri->segment(2);
        $registration_key = $this->uri->segment(3);
        
        $this->error = FALSE;
        
        if ( ( $user_id !== NULL ) && ( $registration_key !== NULL ) )
        {
            
            if ( ( isset( $user_id )) && ( ( trim( $user_id ) !== '' ) || ( !empty( $user_id ) ) ) )
            {
                if ( !is_numeric( $user_id ) )
                {
                    $this->error = TRUE;
                }
            }
            
            if ( ( isset( $registration_key ) ) && ( ( trim( $registration_key ) !== '' ) || ( !empty( $registration_key ) ) ) )
            {
                if ( !preg_match( '/^[A-Za-z0-9]+$/', $registration_key ) )
                {
                    $this->error = TRUE;
                }
            }
        }
        
        $msgBoxMsgs = array();
  $cssPageAddons = '';
  $jsPageAddons =  '[removed][removed][removed][removed][removed][removed][removed][removed]';
  $metaAddons = '';
  $siteTitle = 'KOW Manager Account Activation';
        
        $bodyContent = $this->error ? show_404() : '/usermanagement/forms/activation_form';
        $bodyType = 'full';//type of template  
          
  if(count($msgBoxMsgs) !== 0)
  {
   $msgBoxes = $this->msgboxes->buildMsgBoxesOutput(array('display' => 'show', 'msgs' =>$msgBoxMsgs));
  }
  else
  {
   $msgBoxes = array('display' => 'none');
  }
        
  if(isset($siteTitle) && (empty($siteTitle)) )
  {
   $siteTitle = $this->metatags->SiteTitle();
  }
  
        $this->data = compact(
    'msgBoxes',
    'cssPageAddons',
    'jsPageAddons',
    'siteTitle',
    'bodyType',
    'bodyContent'
   );
  $this->load->view('usermanagement/index', $this->data);      
    }
    
    public function index( )
{
  
}
    
}

/* End of file activation.php */
/* Location: ./application/controllers/activation.php */


Messages In This Thread
Activation Routes - by El Forum - 08-10-2012, 11:59 AM
Activation Routes - by El Forum - 08-10-2012, 12:07 PM
Activation Routes - by El Forum - 08-10-2012, 12:28 PM
Activation Routes - by El Forum - 08-10-2012, 12:37 PM
Activation Routes - by El Forum - 08-10-2012, 12:40 PM
Activation Routes - by El Forum - 08-10-2012, 12:47 PM
Activation Routes - by El Forum - 08-10-2012, 01:43 PM
Activation Routes - by El Forum - 08-11-2012, 12:02 PM
Activation Routes - by El Forum - 08-11-2012, 09:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB