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

[eluser]Tom Glover[/eluser]
Nice. No problems so far.

[eluser]CARP[/eluser]
Sorry
Where can I get 1.4?
http://code.google.com/p/reduxauth/downloads/list
still shows old version

Thanks

[eluser]Popcorn[/eluser]
No, I'm just updating you on progress for 1.4

Sorry if you misinterpreted it. I'll be more clear.

[eluser]CARP[/eluser]
Hi Mathew
I've been playing with the default user controller you posted in the last version released, and all went ok until I've submitted the reg. form

Here's the code of the register function in the admin controller

Code:
// Registro del usuario admin
    function registro ()
    {    
        $rules['camponombre']         = 'trim|required';
        $rules['campousuario']         = 'trim|required|callback_check_username';
        $rules['campoemail']         = 'trim|required|callback_check_email';
        $rules['campoclave']         = 'trim|required|matches[campoclave2]';
        $rules['campoclave2']         = 'trim|required';
        $rules['campopregunta']     = 'trim|required';
        $rules['camporespuesta']     = 'trim|required';
            
        $this->validation->set_rules($rules);
        $this->validation->set_error_delimiters('<p class="error">', '</p>');
            
        if($this->validation->run())
        {
            $register = $this->redux_auth->register
            (
                $this->input->post('campousuario'),
                $this->input->post('campoclave'),
                $this->input->post('campoemail'),
                $this->input->post('campopregunta'),
                $this->input->post('camporespuesta')
            );
            
            switch($register)
            {
                case 'REGISTRATION_SUCCESS':
                    echo 'SUCCESS';
                    break;
                case 'REGISTRATION_SUCCESS_EMAIL':
                    echo 'SUCCESS EMAIL';
                    break;
                default: // Failed
                    echo 'IT DIDNT WORK';
                    break;
            }
        }
        else
        {
            $this->load->view('admin/admin_registroadmin_view.php');
        }
    }

After submitting the registration form, I'm getting this...

http://img67.imageshack.us/img67/4010/sshot1ja1.jpg

Do you know what I'm doing wrong?
Thanks...

[eluser]Tom Glover[/eluser]
You are Echoing Data before loading the view. You will need to set the echo's as vars instead then echo them in site the view file.

[eluser]Popcorn[/eluser]
Remove the echo statment and also download the latest version of Redux

http://code.google.com/p/reduxauth/downloads/list

I seem to have forgotten to remove the debug messages.

[eluser]CARP[/eluser]
Thanks guys
I've replaced the echos by redirects (loading url helper previously) but the errors and warnings keep showing.
I'll get the latest version and will try again...

[eluser]Alex.[/eluser]
Hey this looks like a great library, was just about to start using it when I noticed a few snags / concerns!

EDIT1: Also, if the user is logged in when an admin bans them, wouldn't they still be classed as 'logged in' until their session expires?

EDIT: Ignore the stuff below, I found some posts in this thread


Please forgive me for not checking if any my comments have been raised before, but I don't have much time and 20 pages are quite time consuming to go through....

First off, the examples -
Line 11, example files/controllers/user.php
<code>
$data1['username'] = $this->redux_auth->get_username($this->session->userdata('id'));
</code>

function get_username() does not exist in the library. Without this function I personally can't see anyway to retrieve the username / other user details without querying the database myself.

Is this intended?

If it is, may I ask why there aren't any models to access the data?

Also, it might be a good idea to allow a 'default username' option / guest user so as to make it easier to handle users who aren't logged in.

[eluser]Popcorn[/eluser]
Hi Alex,

Yes, they would. I guess there was a downside to moving that method elsewhere after all. To mitigate that you can make a quick method to check the value of the banned_id in the users row and return a bool then run this via a "hook" to check the value on each page call.

And yes, those examples are outdated. I am nearly done with the new version, it's coming along really nicely and hope to have it booted out the door soon.

-Mathew.

[eluser]neryo[/eluser]
Redux Authentication library Tutorial in ITALIAN




Theme © iAndrew 2016 - Forum software by © MyBB