We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Why am I being constantly logged out from admin?

I have installed Vokuro example app and after setting the Amazon SES and successful registration of a new user I have, surprisingly, another problem.

The problem is that after I log in, I am being reditrected to the user area and I can crete new user, edit stuff etc., however, when I click on the home or about link in the top menu I am being redirected to the homepage, but I am also logged out.

Why is that?

I have tried that in several browsers, tried to tick remember me checkbox, but I am still being logged out all the time.

How to log out only when clicking on Log out button?

What can be causing this problem?

Btw. I am using Phalcon 1.2.6 x86 php 5.4 TS Windows dll., because 1.3 branch doesn't support hashing (https://github.com/phalcon/cphalcon/issues/2277#issuecomment-47796177) for the configuration of mine.



37.0k
Accepted
answer
edited Jul '14

TO PEOPLE WITH SIMILAR PROBLEM AND CONSTANT "LOGGED OUT" ISSUE. IT'S JUST THE BAD PROGRAMMING PRACTICE OF THE AUTHORS OF THE VOKURO APP. YOU ARE ALREADY LOGGED IN, BUT FOR SOME REASON THERE IS NO CHECK FOR " IS LOGGED IN OR NOT" AND THE LOGIN FORM IS OFFERED EVEN IF YOU ARE ALREADY LOGGED IN.

I solved that, but this kind of lazy programming is very bad, especially for such interesting project like Phalcon,

E.g. if you allow double login, meaning not checking if the user is already logged in, then you are confusing the users and making things seems to be more complicated than they are.

Another "lazy and irresponsible" programming is to not change log in to log out in the top bar. It's one if condition to check session.

I don't get it. It's so interesting framework, but then you have such things like hash functions not working in 1.3.0 branch (windows, x86, php 5.4, TS) (I have to use 1.2.6 instead), bad programming practice examples (allowing users to log in even if he is logged in already, as mentioned above). Finding older version than 1.3.1 of Phalcon is extremely hard etc. Simple things like that frustrate me a lot.

But I will try to stay with Phalcon, but damn it's sometimes really hard to find answers to simple things. I guess it's because only a few people use Phalcon.

Anyway, the struggle with Phalcon continues ;)