• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not printing array

#1
[eluser]xtremer360[/eluser]
I just have no idea when I even do a test run of this controller it does not print the $user_data inside the library activate_user function. I'm not seeing why it wouldn't. Does anyone else? Because clearly what I want to do is match the input with what is store in the database. I'm not getting any errors its just not showing the array.

Activate user form:

http://www.kansasoutlawwrestling.com/kow...16eb38f686

Library

Code:
function activate_user($user_id, $registration_key, $password)
{
    $this->ci->users->purge_na();

    if ((strlen($user_id) > 0) AND (strlen($registration_key) > 0))
    {
        $user_data = $this->ci->users->get_user_by_user_id($user_id);
        print_r($user_data);
        $genPassHash = $this->ci->genfunc->GenPassHash($password);
        echo '<br />';
        print_r($genPassHash[0]);

        if ($user_data['password'] == $genPassHash[0])
        {
            return $this->ci->users->activate_user($user_id, $registration_key, $reGenFromPostPW[]);
        }
        else
        {
            return false;                
        }
    }
    else
    {
        return false;
    }  
}


#2
[eluser]CroNiX[/eluser]
Try putting a die(); immediately after it. Since your returning...it's probably flashing it on the screen faster than you can see it before displaying something else.

#3
[eluser]xtremer360[/eluser]
Refresh my link because that didn't do anything for me.

#4
[eluser]Aken[/eluser]
Or not entering the IF statement in the first place.

#5
[eluser]xtremer360[/eluser]
It was because it was printing out $genPassHash[0])


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.