View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015808 | mantisbt | api soap | public | 2013-05-04 03:03 | 2014-01-23 17:59 |
Reporter | vboctor | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | acknowledged | Resolution | open | ||
Product Version | 1.2.15 | ||||
Summary | 0015808: mc_issue_update() accepts AccountData but requires id for monitoring users | ||||
Description | As per the convention any api that accepts an objectref or account, should accept id, name, or email and use these to lookup the user. The helper method that internally handles setting monitoring users requires the id field to be set otherwise it causes a PHP notice. | ||||
Tags | No tags attached. | ||||
Sounds like something we should fix. |
|
Careful with using email as identifier as it is not necessarily unique |
|
We already have a helper method (mci_get_user_id) that gets a user id given an AccountData or ObjectRef. It follows this algorithm:
When looking up by email it assumes uniqueness or the fact that any match will be fine. We could return no match when there is more than one match. The current implementation also doesn't consider empty emails as "not specified". Hence, if allow blank emails is ON, then there could be multiple matches there as well. |
|