WoW!! ... O_O ...

The "else" statement is not executed... it's so strange :s .  Then, the unic
statement can be executed is the "elseif" statement, and is because this why
i see the "clean login" with no error messages... but I don't understand
what happens with the form data... (because when the data is not correct,
the app can know it and show an error message...).

2011/9/2 Teddy Zeenny <[email protected]>

> Ok no problem...
>
> I don't think it will be hard to fix.. Just need to locate the problem.
>
> It might be that the login action in the users controller is not
> redirecting at all.
>
> Replace the login function with this and let me know what happens.
>
> public function login () {
>  $this->set ('title_for_layout', 'ARE · Gestió de Pràctiques externes');
> $this->set ('header_text', 'ARE · Gestió de Pràctiques externes');
>  if (isset ($this->data) && $this->Auth->login ($this->data) == 0) {
>  $this->set ('cleanLogin', false);
> } else if(empty($this->data)) {
>  $this->set ('cleanLogin', true);
> }
>               else {
>                      exit ('login action not redirecting');
>                }
> }
>
> On Fri, Sep 2, 2011 at 4:16 PM, CaStarCo <[email protected]> wrote:
>
>>
>>
>> 2011/9/2 Teddy Zeenny <[email protected]>
>>
>>> Can you check if you are reaching the dashboard action (in users
>>> controller) before being logged out?
>>>
>>> For example by setting
>>>
>>> function dashboard()
>>> {
>>>     exit('in dashboard');
>>>
>>>    //dashboard code here
>>> }
>>>
>>>
>> I've checked it :( , i'm not reaching the dashboard action...
>>
>>
>>> On Fri, Sep 2, 2011 at 3:08 PM, CaStarCo <[email protected]> wrote:
>>>
>>>> Hello, I've wrote here one month ago about the same problem, I couldn't
>>>> solve it, and I'll try another time.
>>>>
>>>> I have a login method in users controller that works well in my
>>>> development environment (Windows 7 + Apache 2.2 + PHP 5.3.6) , if i write
>>>> the correct user and the correct pass, then I can log in and play with my
>>>> app, if I write wrong login info, then the login method tell me I wrote
>>>> wrong datra.
>>>>
>>>> But... in the production environment I have a superstrange bug. I'm
>>>> working with Linux (I can't know the version :s, I'm not the admin), with
>>>> PHP 5.3.2, the configuration of PHP is the same as the configuration in my
>>>> development environment.
>>>>
>>>> The bug: When  i write the correct login data, then the login is made
>>>> "correctly", but I can't see it, automaticly the app logouts and send me
>>>> another time to the login view (without any error message). When i put 
>>>> wrong
>>>> login data the app works well, the login method tells me that i wrote
>>>> incorrect data.
>>>>
>>>> The database (included AROs and ACOs and relations between AROs and
>>>> ACOs) are exactly equal in both environments.
>>>>
>>>> The code:
>>>> Users Controller: http://pastebin.com/NgX0d6L5
>>>> App Controller: http://pastebin.com/9JBCzTVJ
>>>> Login View: http://pastebin.com/bed6LZVE
>>>> Views Layout: http://pastebin.com/wfdjG0Rz
>>>>
>>>> I'm desperate U_U . In any case,
>>>> thanks in advance.
>>>>
>>>> --
>>>> Our newest site for the community: CakePHP Video Tutorials
>>>> http://tv.cakephp.org
>>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>>> help others with their CakePHP related questions.
>>>>
>>>>
>>>> To unsubscribe from this group, send email to
>>>> [email protected] For more options, visit this
>>>> group at http://groups.google.com/group/cake-php
>>>>
>>>
>>>  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> [email protected] For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>
>>
>> --
>> - Per la llibertat del coneixement -
>> - Per la llibertat de la ment...       -
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...       -

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to