Welcome Guest, Not a member yet? Register   Sign In
User Login Page?
#11

[eluser]Bramme[/eluser]
Great! You can proof read it :p

If you think things are missing, unclear or if your interested in additional things, please let me know!
#12

[eluser]ywftdg[/eluser]
Bramme, worked like a charm! Learned some good stuff along the way too! Thanks again, and again for posting that. One thing I did notice, was when I clicked the link to 'view plain' on the code, in Safari (mac) it opens squished to one line. Works fine in FireFox 3 on (mac) though. Other than that, all looks good to me!
#13

[eluser]Bramme[/eluser]
That's the JavaScript I'm afraid... It's the first time I used it but it's good to know the bug's there. Though I don't really care :p People reading it will probably have got Firefox ^^
#14

[eluser]ywftdg[/eluser]
Curious on something in your auth library. I am trying to set the cookie to something else than the say user name, in my case username is the email. I want to use my user's id from the database instead for the cookie. I have been trying this, but its not working. Maybe I am just using the query variable wrong here, or maybe i'm missing something al together?

Code:
// Query time
    $this->CI->db->where('dEmail', $email);
    $this->CI->db->where('dPassword', $password);
    $query = $this->CI->db->get('designer');
    
    if ($query->num_rows() == 1)    {
        // Our user exists, set session.
        $designerid = $query[0]; //First item in array would be the designerid
        $this->CI->session->set_userdata('logged_user', $designerid );
        return TRUE;
    }     else {
        // No existing user.
        return FALSE;
        }
    }

Update, was able to fix changing to grab the row via:

Code:
foreach ($query->result() as $row) {
            $designerid = $row->dDesignerId;
        }
#15

[eluser]Bramme[/eluser]
Indeed, $query[0]would not have worked, seeing as it wasn't converted into a result (or row) yet.

A better way would be (imo)
Code:
$row = $query->row();
$designerid = $row->dDesignerID;
#16

[eluser]ywftdg[/eluser]
indeed better, thanks.
#17

[eluser]Randy Casburn[/eluser]
Please consider this post: Authentication (ACL) - Challenges - Solutions - Dilemmas

Thanks,

Randy




Theme © iAndrew 2016 - Forum software by © MyBB