View Issue Details

IDProjectCategoryView StatusLast Update
0008779mantisbtplug-inspublic2016-06-12 00:42
ReporterNT Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0008779: Need User life-cycle Events for plug-ins
Description

I am working on a plug-in that will need to be informed when a user is deleted,
so that their table rows for the plug-in can be removed.

Other plug-ins would want to know about users being added or updated.

Do we also need to have pre-add and pre-update events, so that plugins can
be written to add extra validation to user maintenance,
e.g. password plugin to enforce a companys password standards.

Proposed User Life Cycle Events

EVENT_USER_PRE_ADD
EVENT_USER_ADD
EVENT_USER_PRE_UPDATE
EVENT_USER_UPDATE
EVENT_USER_DELETE

Is there a standard for how (and what) parameters will be passed to events yet?

TagsNo tags attached.

Relationships

has duplicate 0014165 closedvboctor Plugin event when new account was created via LDAP 
related to 0013143 new add event email signup 

Activities

vboctor

vboctor

2008-01-20 19:44

manager   ~0016735

Adding user life cycle events makes sense. Actually, in the first stab at the plug-ins requirements, I've created a list of events (including user related ones). Such events can be found at:

http://www.mantisbt.org/wiki/doku.php/mantisbt:addson_requirements

Maybe it is a good time now to filter this list and come up with the ones that we want to go ahead with.

vboctor

vboctor

2016-01-24 02:44

manager   ~0052367

Will start this with adding events similar to the ones we currently have for projects:

'EVENT_MANAGE_USER_CREATE_FORM' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_USER_CREATE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_USER_UPDATE_FORM' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_USER_UPDATE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_USER_DELETE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_USER_PAGE' => EVENT_TYPE_EXECUTE,

Which are similar to the project ones which look as follows:

'EVENT_MANAGE_PROJECT_CREATE_FORM' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_PROJECT_CREATE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_PROJECT_UPDATE_FORM' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_PROJECT_UPDATE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_PROJECT_DELETE' => EVENT_TYPE_EXECUTE,
'EVENT_MANAGE_PROJECT_PAGE' => EVENT_TYPE_EXECUTE,
vboctor

vboctor

2016-01-24 02:51

manager   ~0052368

PR: https://github.com/mantisbt/mantisbt/pull/710

atrol

atrol

2016-01-25 04:23

developer   ~0052373

Reopend and removed changeset as there is no commit in master for it.

Related Changesets

MantisBT: master 8503a2da

2016-01-23 21:45

vboctor


Details Diff
Add plugin events for user accounts lifecycle

- EVENT_MANAGE_USER_CREATE_FORM
- EVENT_MANAGE_USER_CREATE
- EVENT_MANAGE_USER_UPDATE_FORM
- EVENT_MANAGE_USER_UPDATE
- EVENT_MANAGE_USER_DELETE
- EVENT_MANAGE_USER_PAGE

Fixes 0008779
Affected Issues
0008779
mod - core/events_inc.php Diff File
mod - core/user_api.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Manage.xml Diff File
mod - manage_user_create_page.php Diff File
mod - manage_user_edit_page.php Diff File
mod - manage_user_update.php Diff File