From 9e1ab77959184af8475c83209584419535ae5e6e Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Sat, 28 Sep 2013 21:49:05 +0100 Subject: [PATCH] create a real new user object when the fetch fails. --- src/application/login.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/application/login.c b/src/application/login.c index 9cc2c28..7b4a966 100644 --- a/src/application/login.c +++ b/src/application/login.c @@ -50,7 +50,18 @@ applicationLogin( session->user->email = CRED_PWD(credential).user; session->user->nemail = &CRED_PWD(credential).nuser; - userLoad(session->user, this->users); + if (NULL == userLoad(session->user, this->users)) { + // this is an ldap user that has not yet set + // additional user informations. + /* @TODO again...change the keys to id's */ + delete(session->user); + session->user = new(User, + CRED_PWD(credential).user, + CRED_PWD(credential).nuser, + CSTRA(""), + CSTRA("")); + } + break; default: