users.php 959 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
  4. * This file is licensed under the Affero General Public License version 3 or later.
  5. * See the COPYING-README file.
  6. */
  7. require_once('../lib/base.php');
  8. OC_Util::checkAdminUser();
  9. // We have some javascript foo!
  10. OC_Util::addScript( 'settings', 'users' );
  11. OC_Util::addScript( 'core', 'multiselect' );
  12. OC_Util::addStyle( 'settings', 'settings' );
  13. OC_App::setActiveNavigationEntry( 'core_users' );
  14. $users = array();
  15. $groups = array();
  16. foreach( OC_User::getUsers() as $i ){
  17. $users[] = array( "name" => $i, "groups" => join( ", ", OC_Group::getUserGroups( $i ) ),'quota'=>OC_Preferences::getValue($i,'files','quota',0));
  18. }
  19. foreach( OC_Group::getGroups() as $i ){
  20. // Do some more work here soon
  21. $groups[] = array( "name" => $i );
  22. }
  23. $tmpl = new OC_Template( "settings", "users", "user" );
  24. $tmpl->assign( "users", $users );
  25. $tmpl->assign( "groups", $groups );
  26. $tmpl->printPage();
  27. ?>