[Owncloud] improvement of persistent logins / problem with update db structure

Michael Göhler somebody.here at gmx.de
Wed Aug 8 12:08:53 UTC 2012


Hi all,

I'm using ownCloud since a year now and there is only one thing that
really bugs from the beginning. Currently it is not possible to access
the cloud from different locations via browser simultaneously. When I
try to login from work, it kicks me out at home and vice versa.

This is because currently a user can have only one session token which
is stored in the preferences and in the login cookie.

Its possible to work around that by editing the cookie to contain the
same token in all browsers. But I want to fix that on the right place ;)

So I want to improve that token/cookie handling a bit using a good best
practices guide:
http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_practice/

I've cloned the master to
git://gitorious.org/~visit/owncloud/improved-persistent-cookies.git
and added my changes.

Feel free to review and comment.

But currently I face a problem with the deployment of the changes. For
the best functionality it was necessary to create a new column "created"
in the preferences table. I changed db_structure.xml for that.

To test the update process I reset my version in config.php to call
updateDbFromStructure(). But I always get:
PHP Fatal error:  Using $this when not in object context
in /var/www/3rdparty/MDB2/Schema/Parser.php on line 554

Can somebody have a look on that please?

If I create the column manually, the rest of the code works fine.

Thanks,
Michael




More information about the Owncloud mailing list