]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #4007 previous solution to admin population in ElggUser was throwing warnings
authorCash Costello <cash.costello@gmail.com>
Tue, 8 Nov 2011 01:31:07 +0000 (20:31 -0500)
committerCash Costello <cash.costello@gmail.com>
Tue, 8 Nov 2011 01:31:07 +0000 (20:31 -0500)
engine/classes/ElggUser.php
views/default/js/initialize_elgg.php

index 51440687d8ffb80d47635bd4bd00c1be0f7e6b71..75ac008f6bfb90728fa76fa9ff243bed3fcfa77c 100644 (file)
@@ -526,7 +526,6 @@ class ElggUser extends ElggEntity
                        'name',
                        'username',
                        'language',
-                       'admin',
                ));
        }
 
index 09e0b27bcbd6760cae59c6f731b11bc9dd0094d0..f8234f84f698a45305b0d2aefbc20a5d32d53e35 100644 (file)
@@ -41,6 +41,7 @@ if ($user instanceof ElggUser) {
        
        $user_json['subtype'] = $user->getSubtype();
        $user_json['url'] = $user->getURL();
+       $user_json['admin'] = $user->isAdmin();
        
        echo 'elgg.session.user = new elgg.ElggUser(' . json_encode($user_json) . ');'; 
 }