projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dev/core#3719 fix inconistent handling of job_type:label
[civicrm-core.git]
/
CRM
/
Core
/
Permission
/
WordPress.php
diff --git
a/CRM/Core/Permission/WordPress.php
b/CRM/Core/Permission/WordPress.php
index 03eeb9be3b0fa7c7be72ed61bdb036082ef2ac82..dfcc6c34a3f2bba7704feabf2365c6c1b3184b45 100644
(file)
--- a/
CRM/Core/Permission/WordPress.php
+++ b/
CRM/Core/Permission/WordPress.php
@@
-60,14
+60,14
@@
class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base {
$user = $userId ? get_userdata($userId) : wp_get_current_user();
$user = $userId ? get_userdata($userId) : wp_get_current_user();
- if ($user
->has_cap('super admin') || $user->has_cap('administrator'
)) {
+ if ($user
Id !== 0 && ($user->has_cap('super admin') || $user->has_cap('administrator')
)) {
return TRUE;
}
// Make string lowercase and convert spaces into underscore
$str = CRM_Utils_String::munge(strtolower($str));
return TRUE;
}
// Make string lowercase and convert spaces into underscore
$str = CRM_Utils_String::munge(strtolower($str));
- if ($user->exists()) {
+ if ($user
Id !== 0 && $user
->exists()) {
// Check whether the logged in user has the capabilitity
if ($user->has_cap($str)) {
return TRUE;
// Check whether the logged in user has the capabilitity
if ($user->has_cap($str)) {
return TRUE;