New permission '*' meaning 'no group required'
authorjean-gui@barbossa
Fri, 01 Jul 2011 18:35:15 +0200
changeset 2 4bd33c66976f
parent 1 8a0f0ff07b45
child 3 a3402c9d9582
New permission '*' meaning 'no group required'
wordpress_ldap_plugin/ldap_roles/lib/ldap_roles.php
--- a/wordpress_ldap_plugin/ldap_roles/lib/ldap_roles.php	Thu Feb 10 15:10:58 2011 +0100
+++ b/wordpress_ldap_plugin/ldap_roles/lib/ldap_roles.php	Fri Jul 01 18:35:15 2011 +0200
@@ -69,6 +69,10 @@
 function updateBlogUserRoles($blog_id, $user_id, $user_groups, $perms, $globalPerms, $priorities) {
     if($priorities && $perms) {
         foreach($priorities as $priority => $roleKey) {
+            if(($perms && in_array('*', $perms[$roleKey])) || ($globalPerms && in_array('*', $globalPerms[$roleKey]))) {
+                wpmuLdapAddUserToBlog($user_id, $blog_id, $roleKey);
+                return true;
+            }
             foreach($user_groups as $g) {
                 
                 $group_dn = strtolower($g[get_site_option('ldapAttributeDN',LDAP_DEFAULT_ATTRIBUTE_DN)]);