]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Merge branch 'master' into ssl-client-certs
authorChristian Weiske <cweiske@cweiske.de>
Thu, 12 May 2011 17:24:34 +0000 (19:24 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 12 May 2011 17:24:34 +0000 (19:24 +0200)
1  2 
src/SemanticScuttle/Service/User.php

index 4af8e14498ef304fc3f068137846ac53a461402a,072ce856cbd8abd93f0d63ee7dcbc97e1d829e1c..09a2cb19ab8486df6cc41f0bda29fab3737887f1
@@@ -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;
      }