Hello all!

I discovered a rather strange error the other day when one of the
app's I'm developping in CakePHP stopped working ... The thing happend
was that logging in, didn't write any of the session variables at
all ... The original code was like this:

        function cdlogin() {
                $this->layout = 'cursusdienst';
                $this->pageTitle = '| login';
                $this->set('error', false);
                if (!empty($this->data)) {
                        $student = 
$this->Student->findByStudentennr($this->data['Student']
['studentennr']);
                        if (!empty($student['Student']['wachtwoord']) && 
$student['Student']
['wachtwoord'] == md5($this->data['Student']['wachtwoord'])) {
                                $this->Session->write('Student.ingelogd', 
'ingelogd');
                                $this->Session->write('Student.student.id', 
$student['Student']
['id']);
                                $this->Session->write('Student', 
$student['Student']);
                                $this->redirect('/cd/');
                        } else {
                                $this->set('error', true);
                        }
                }
        }

Basicly this checks a user by his student number (which is a unique
number) and then checks his password, comparing the entered password
with the md5 hash stored in the database. Then a number of session
variables are set as to track a user being logged in or not. Now what
happend was that the $this->Session->write() didn't write anything to
the session. Nothing, nada ...
When I changed the '.' in the key for the Session->write()'s to a '-'
suddenly everything started working again ... Anyone knows what could
have caused this to happen? I'm using the latest stable release of
CakePHP, PHP5 and Apache2 on Ubuntu.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to