projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feb3f25
)
CRM-12413 - Return an error when api-key does not have an associated CMS user
author
Colby Warkentin
<colby.warkentin@p2c.com>
Tue, 23 Apr 2013 23:21:46 +0000
(16:21 -0700)
committer
Tim Otten
<totten@civicrm.org>
Tue, 30 Apr 2013 19:40:49 +0000
(12:40 -0700)
----------------------------------------
* CRM-12413: CiviCRM does not error on an api-key given through the REST interface that is not connected to a CMS user
http://issues.civicrm.org/jira/browse/CRM-12413
CRM/Utils/REST.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/REST.php
b/CRM/Utils/REST.php
index a55ca67d66f1ccb6eb6e85e68c9f517d37c5abc6..3fa52d2ddf023ed502938f3b247621c2b55c5557 100644
(file)
--- a/
CRM/Utils/REST.php
+++ b/
CRM/Utils/REST.php
@@
-679,6
+679,11
@@
class CRM_Utils_REST {
if ($uid) {
CRM_Utils_System::loadBootStrap(array('uid' => $uid), TRUE, FALSE);
}
+ else {
+ $err = array('error_message' => 'no CMS user associated with given api-key', 'is_error' => 1);
+ echo self::output($err);
+ CRM_Utils_System::civiExit();
+ }
}
}