entrance: load session for history
This commit is contained in:
parent
ac231982aa
commit
c3200fa89c
|
@ -199,13 +199,27 @@ _entrance_display_ready(const char *dname)
|
|||
else
|
||||
{
|
||||
//TODO test if there is allready a user loggind in
|
||||
Entrance_Login *el;
|
||||
Eina_List *l;
|
||||
const char *session = NULL;
|
||||
|
||||
PT("auth user\n");
|
||||
entrance_pam_init("entrance", dname, NULL);
|
||||
#ifdef HAVE_PAM
|
||||
entrance_pam_item_set(ENTRANCE_PAM_ITEM_USER, entrance_config->userlogin);
|
||||
#endif
|
||||
//query the history for the session name
|
||||
EINA_LIST_FOREACH(entrance_history_get(), l, el)
|
||||
{
|
||||
if (el->login == entrance_config->userlogin)
|
||||
break;
|
||||
}
|
||||
if (el)
|
||||
session = el->lsess;
|
||||
PT("Using last session %s", session);
|
||||
|
||||
PT("login user\n");
|
||||
entrance_session_login(NULL, EINA_FALSE);
|
||||
entrance_session_login(session, EINA_FALSE);
|
||||
//we have a loged user begin entrance shutdown
|
||||
ecore_main_loop_quit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue