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;
}