Răsfoiți Sursa

Merge branch 'master' of https://github.com/unaio/una

AntonLV 3 ani în urmă
părinte
comite
d05813bebe

+ 1 - 1
inc/version.inc.php

@@ -7,6 +7,6 @@
  * @{
  */
 
-define('BX_DOL_VERSION', '13.0.0-RC1'); ///< system files version, for DB version @see bx_get_ver, DB and files version must match
+define('BX_DOL_VERSION', '13.0.0-DEV9'); ///< system files version, for DB version @see bx_get_ver, DB and files version must match
 
 /** @} */

+ 1 - 1
install/index.php

@@ -10,7 +10,7 @@
 define ('BX_DOL_INSTALL',  true);
 define ('BX_SKIP_INSTALL_CHECK', true);
 
-define ('BX_DOL_VER', '13.0.0-RC1');
+define ('BX_DOL_VER', '13.0.0-DEV9');
 
 define ('BX_INSTALL_DEFAULT_LANGUAGE', 'en');
 

+ 5 - 4
modules/boonex/cas_connect/classes/BxCASModule.php

@@ -38,6 +38,7 @@ class BxCASModule extends BxBaseModConnectModule
             $as = new \SimpleSAML\Auth\Simple('default-sp');
 
             $as->requireAuth();
+            // $as->login(['saml:idp' => 'https://url.to/saml/metadata.php']);
 
             $aAttributes = $as->getAttributes();
 			
@@ -48,7 +49,7 @@ class BxCASModule extends BxBaseModConnectModule
 
             if ($iLocalProfileId && $oProfile = BxDolProfile::getInstance($iLocalProfileId)) {
                 // user already exists
-                $this->setLogged($oProfile->id());
+                $this->setLogged($oProfile->id(), '', true, true); // remember user
             }
             else {
                 // register new user
@@ -67,8 +68,8 @@ class BxCASModule extends BxBaseModConnectModule
     {
         $aProfileFields = [];
 
-        $aProfileFields['id'] = $this->_getAttrValue($aProfileInfo['id']); // TODO: change to actial field
-        $aProfileFields['name'] = $this->_getAttrValue($aProfileInfo['name']); // TODO: change to actial field
+        $aProfileFields['id'] = $this->_getAttrValue($aProfileInfo['some_id']); // TODO: change to actual value
+        $aProfileFields['name'] = $this->_getAttrValue($aProfileInfo['some_name']); // TODO: change to actual value
         $aProfileFields['fullname'] = $this->_getAttrValue($aProfileInfo['first_name']) . ' ' . (isset($aProfileInfo['last_name']) ? $this->_getAttrValue($aProfileInfo['last_name']) : '');
 
 		if (isset($aProfileInfo['first_name']))
@@ -78,7 +79,7 @@ class BxCASModule extends BxBaseModConnectModule
             $aProfileFields['last_name'] = $this->_getAttrValue($aProfileInfo['last_name']);
 
         $aProfileFields['email'] = isset($aProfileInfo['email']) ? $this->_getAttrValue($aProfileInfo['email']) : '';
-        $aProfileFields['allow_view_to'] = getParam('bx_cas_privacy');
+		$aProfileFields['allow_view_to'] = getParam('bx_cas_privacy');
 
         return $aProfileFields;
     }