View Issue Details

IDProjectCategoryView StatusLast Update
0014165mantisbtplug-inspublic2016-02-11 16:00
Reporterffp_heiko Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionduplicate 
Product Version1.2.10 
Summary0014165: Plugin event when new account was created via LDAP
Description

I would like to perform some plugin actions after a user account was created when the user was authenticated via LDAP.

Maybe you could add this in user_api.php, function user_create.

Actions I would perform are:

  • Retrieve ldap groups from directory
  • set default access_level by ldap group
  • add user to project with a certain access level by ldap group
Additional Information

Diff files are svn format, not git - sorry

Tagspatch
Attached Files
user_api.diff (342 bytes)   
Index: user_api.php
--- user_api.php Base (BASE)
+++ user_api.php Locally Modified (Based On LOCAL)
@@ -493,6 +493,9 @@
 		email_signup( $t_user_id, $p_password, $t_confirm_hash, $p_admin_name );
 	}
 
+        # Send new user id with event
+        event_signal('EVENT_ACCOUNT_CREATE', array($t_user_id));
+	
 	return $t_cookie_string;
 }
 
user_api.diff (342 bytes)   
event_inc.diff (384 bytes)   
Index: events_inc.php
--- events_inc.php Base (BASE)
+++ events_inc.php Locally Modified (Based On LOCAL)
@@ -68,6 +68,7 @@
 	# User account pages
 	'EVENT_ACCOUNT_PREF_UPDATE_FORM' => EVENT_TYPE_EXECUTE,
 	'EVENT_ACCOUNT_PREF_UPDATE' => EVENT_TYPE_EXECUTE,
+        'EVENT_ACCOUNT_CREATE' => EVENT_TYPE_EXECUTE,
 
 	# Bug filter events
 	'EVENT_FILTER_FIELDS' => EVENT_TYPE_DEFAULT,
event_inc.diff (384 bytes)   

Relationships

duplicate of 0008779 closedvboctor Need User life-cycle Events for plug-ins 

Activities