Welcome Guest, Not a member yet? Register   Sign In
Redux Authentication 1.4a (24th July 2008)

[eluser]Popcorn[/eluser]
Hmm,

I had this bug report from another member too, but I've not heard back from him.

What version did you use the example from? 1.4 contained an error in the example code which was fixed in 1.4a.

If that doesn't fix it, give me a couple days to debug it and I'll get back to you.

Kind Regards,
-Mathew Davies.

[eluser]Mellis[/eluser]
[quote author="jimhern" date="1217193607"]Popcorn, quick question. redux_auth->login returns NOT_ACTIVATED on user login, so the code in my switch for the 'NOT_ACTIVATED' case is executed. The problem is that NOT_ACTIVATED should only return if the activation_code field is not empty, and it is empty, because I'm not using any e-mail registration. Am I missing something?

I'm using the example login code from the tutorial as a base.[/quote]
Hello,
I am testing with redux_auth 1.4(a), use ->login() to let users enter an application and I don't have the problem you mention. (Not that I am saying that you don't have a problem, I just wanted to let you know that in my case, it is working as expected.)
Maybe post the code you have to use the (great) redux_auth library?

[eluser]jimhern[/eluser]
I'll take a look at the code tomorrow morning and get back to you. Thanks!

[eluser]andreagam[/eluser]
Quote:The problem is that NOT_ACTIVATED should only return if the activation_code field is not empty, and it is empty, because I’m not using any e-mail registration.
Hello, I'm experiencing the same problem. Version 1.4a.
I'll have a better look at the code, but at the moment that's it.

(BTW, thanks popocorn for this great contribution)...

[eluser]andreagam[/eluser]
Hi people, I'm posting the code that's giving me the "NOT ACTIVATED" error:

Controller:
Code:
function login ()
        {
            $rules['email']         = "required";
            $rules['password']         = "required";    

            $this->validation->set_rules($rules);

            $fields['email']        = 'Email Address';
            $fields['password']        = 'Password';            

            $this->validation->set_fields($fields);

            if ($this->validation->run() == true)
            {
                $redux = $this->redux_auth->login
                (
                    $this->input->post('email'),
                    $this->input->post('password')
                );

                switch ($redux)
                {
                    case 'NOT_ACTIVATED':
                        echo "NOT ACTIVATED"; exit;
                        break;
                    case 'BANNED':
                        echo "BANNED"; exit;
                        break;
                    case false:
                        echo "FALSE"; exit;
                        break;
                    case true:
                        echo "TRUE"; exit;
                        break;
                }
            }
            else
            {
                $this->load->view("welcome/login");
            }
        }

and this in the Redux_auth config file:
Code:
$config['auth']['email_activation'] = false;

Anybody seeing something wrong?
Thanks,

[eluser]andreagam[/eluser]
Sorry, forgot to post the Login view:
Code:
<?php echo form_open('user/login'); ?>
    <?php if(!empty($this->validation->error_string) || !empty($status)) { ?>
    <fieldset>
        <legend>Errors</legend>
            &lt;?php echo $this->validation->error_string, $status; ?&gt;
    </fieldset>
    &lt;?php } ?&gt;
    <fieldset>
        <legend></legend>
        
            <label for="email">Email</label>&lt;?php echo form_input('email'); ?&gt;</li>
            <label for="password">Password</label>&lt;?php echo form_password('password'); ?&gt;</li>
            <label for="submit">&nbsp;</label>&lt;?php echo form_submit('submit', 'Login Now'); ?&gt;&nbsp;&nbsp;&nbsp;&lt;?php echo  anchor('user/register', 'Register Here'); ?&gt;</li>
        
    </fieldset>
&lt;?php echo form_close(); ?&gt;

This calls the controller "user/login" in the previous post.

[eluser]lizaaard[/eluser]
do you look at your database?

the 'activation_code' field must be empty...

i'm using v1.4 and it's working perfect for me...

about that... what's the change on the tutorial of v1.4a??


EDITED : i think i've found the mistake on the login tutorial... it was the ; at the end of line? Tongue

[eluser]xpix[/eluser]
seems there is a page missing from the user guide or there is an extra menu item

Controllers link does not work and the file is missing

[eluser]andreagam[/eluser]
Correct, lizaaard, the activation_code filed is empty...

Maybe the 1.4a version is buggy and the 1.4 works?

[eluser]lizaaard[/eluser]
reaaly don't know... but you can download the 1.4 from here :

Code:
http://reduxauth.googlecode.com/files/Redux Authentication Version 1.4.zip


or here




Theme © iAndrew 2016 - Forum software by © MyBB