From: Christian Weiske Date: Thu, 12 May 2011 17:24:34 +0000 (+0200) Subject: Merge branch 'master' into ssl-client-certs X-Git-Tag: v0.98.0~47 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fbfbd8d5cae579058b5d31b97c062cefd9bb36b6;p=semanticscuttle.git Merge branch 'master' into ssl-client-certs --- fbfbd8d5cae579058b5d31b97c062cefd9bb36b6 diff --cc src/SemanticScuttle/Service/User.php index 4af8e14,072ce85..09a2cb1 --- a/src/SemanticScuttle/Service/User.php +++ b/src/SemanticScuttle/Service/User.php @@@ -400,21 -400,12 +415,21 @@@ class SemanticScuttle_Service_User exte if ($row = $this->db->sql_fetchrow($dbresult)) { $this->setCurrentUserId( - (int)$row[$this->getFieldName('primary')] + (int)$row[$this->getFieldName('primary')], true ); $this->db->sql_freeresult($dbresult); - return (int)$_SESSION[$this->getSessionKey()]; + return $this->currentuserId; } } + + $ssls = SemanticScuttle_Service_Factory::get('User_SslClientCert'); + if ($ssls->hasValidCert()) { + $id = $ssls->getUserIdFromCert(); + if ($id !== false) { + $this->setCurrentUserId($id); + return (int)$_SESSION[$this->getSessionKey()]; + } + } return false; }