[icinga-checkins] icinga.org: icinga-web/r1.3: * Added missing principal creation on user import via external auth ( resolves #1326)

git at icinga.org git at icinga.org
Tue Mar 22 09:28:41 CET 2011


Module: icinga-web
Branch: r1.3
Commit: c24cdae34c02df1aa4268c3a393fd4c7b33bcaff
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=c24cdae34c02df1aa4268c3a393fd4c7b33bcaff

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Tue Mar 22 09:16:52 2011 +0100

* Added missing principal creation on user import via external auth (resolves #1326)

---

 .../AppKit/models/Auth/DispatchModel.class.php     |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/app/modules/AppKit/models/Auth/DispatchModel.class.php b/app/modules/AppKit/models/Auth/DispatchModel.class.php
index 30821cd..8ebd64a 100755
--- a/app/modules/AppKit/models/Auth/DispatchModel.class.php
+++ b/app/modules/AppKit/models/Auth/DispatchModel.class.php
@@ -241,6 +241,8 @@ class AppKit_Auth_DispatchModel extends AppKitBaseModel implements AgaviISinglet
 
 		$this->log('Auth.Dispatch: User %s not found, try to import', $username, AgaviLogger::DEBUG);
 		
+		$padmin = $this->getContext()->getModel('PrincipalAdmin', 'AppKit');
+		
 		foreach ($this->provider_keys as $pid) {
 			$provider = $this->getProvider($pid);
 			if ($provider->canCreateProfile()) {
@@ -263,6 +265,14 @@ class AppKit_Auth_DispatchModel extends AppKitBaseModel implements AgaviISinglet
 					 			$user->NsmRole[] = $group;
 					 		}
 					 	}
+					 	
+					 	
+					 	$padmin->updatePrincipalValueData(
+						 	$user->NsmPrincipal,
+						 	array(),
+						 	array()
+					 	);
+					 	
 	
 					 	$user->save();
 	





More information about the icinga-checkins mailing list