SessionTypes / Autoloading
Authentication, Session Types, AutoloadingeGW looks if we get a last_domain cookie, to identify the last domain
and show the user the right login screen message. Or you could say we
try to guess and start with the right instance, if we know the users
last one from login. Does not matter much, if we can "guess" it from the
Then we look for a last_user cookie, to present the user the login
screen in his language and preset the language select box (if enabled).
We need the framework class instantiated as its the one rendering the
screen. I can be changed by setting login_template in the header.inc.php
(no GUI to change it).
If the login get's submitted, it get submitted to the domain/instance
which rendered the login screen. If you use a domain select box, the
user might have changed the domain and we need to reload the config of
that domain and open a new database connection (sessions::create()).
Maybe the code could be a bit smarter at that point and bootstrap the
correct domain from the posted user-name or domain, I thought it does,
when I originally reworked that part. I'm not sure who added it, it
might be from the SyncML stuff ...
Not sure if there's much to gain at the login stage, as it happens only
once per session. For a regularly page request it does not matter: The
domain is determined from the domain cookie and the egw object and
egw_info array get restored from the session specified by the session_id
cookie. The restore from the session only happens if the session-type is
php4-restore! The restored object is in the stage it has after including
the header, meaning we only restore the api (non-application-specific)