View Issue Details

IDProjectCategoryView StatusLast Update
0008779mantisbtplug-inspublic2016-06-12 00:42
ReporterNTAssigned Tovboctor 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version 
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-24 02:45:24

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
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

Issue History

Date Modified Username Field Change
2008-01-20 17:34 NT New Issue
2008-01-20 19:44 vboctor Note Added: 0016735
2016-01-24 02:27 vboctor Assigned To => vboctor
2016-01-24 02:27 vboctor Status new => assigned
2016-01-24 02:44 vboctor Note Added: 0052367
2016-01-24 02:51 vboctor Note Added: 0052368
2016-01-24 03:01 vboctor Relationship added has duplicate 0014165
2016-01-24 03:02 vboctor Relationship added related to 0013143
2016-01-24 16:53 vboctor Changeset attached => MantisBT user_events 04f18502
2016-01-24 16:53 vboctor Status assigned => resolved
2016-01-24 16:53 vboctor Resolution open => fixed
2016-01-25 04:23 atrol Status resolved => assigned
2016-01-25 04:23 atrol Resolution fixed => open
2016-01-25 04:23 atrol Note Added: 0052373
2016-01-25 04:23 atrol Changeset removed MantisBT user_events 04f18502 =>
2016-01-30 15:55 vboctor Changeset attached => MantisBT master 8503a2da
2016-01-30 15:55 vboctor Status assigned => resolved
2016-01-30 15:55 vboctor Resolution open => fixed
2016-01-30 15:55 vboctor Fixed in Version => 1.3.0-rc.2
2016-01-30 16:20 atroladmin Target Version => 1.3.0-rc.2
2016-06-12 00:42 vboctor Status resolved => closed