/**
  * Display a listing of users
  *
  * @return Response
  */
 public function index()
 {
     if (!Sentry::getUser()) {
         return Redirect::route('sessions.create');
     }
     $users = Sentry::findAllUsers();
     return View::make('users.index', compact('users'));
 }
Exemplo n.º 2
0
 public function getUsuarios()
 {
     $mensaje = Input::get('mensaje', '');
     $this->_titulo = 'Usuarios - ';
     $this->_menu = 'usuarios';
     $users = Sentry::findAllUsers();
     return View::make('admin.usuario.listar')->with('titulo', $this->_titulo)->with('menu', $this->_menu)->with('usuarios', $users)->with('mensaje', $mensaje);
 }
Exemplo n.º 3
0
 /**
  * Admin.user.view
  */
 public function getIndex()
 {
     // Set permission
     Auth::requirePermissions('admin.user.view');
     // Get all users
     $users = \Sentry::findAllUsers();
     // Get all groups
     $groups = \Sentry::findAllGroups();
     // Get error
     $error = Flash::get();
     $view = \View::make('ui.users.list')->with('title', 'User management | The Datatank')->with('users', $users)->with('groups', $groups)->with('error', $error);
     return \Response::make($view);
 }
Exemplo n.º 4
0
 /**
  * Admin.group.view
  */
 public function getIndex()
 {
     // Set permission
     Auth::requirePermissions('admin.group.view');
     // Get all users
     $users = \Sentry::findAllUsers();
     // Get all groups
     $groups = \Sentry::findAllGroups();
     // Get all permissions
     $permission_groups = \Config::get('permissions');
     $input_permission_groups = \Config::get('tdt/input::permissions');
     if (!empty($input_permission_groups)) {
         $permission_groups = array_merge($permission_groups, $input_permission_groups);
     }
     // Get error
     $error = Flash::get();
     return \View::make('ui.groups.list')->with('title', 'Group management | The Datatank')->with('users', $users)->with('groups', $groups)->with('permission_groups', $permission_groups)->with('error', $error);
     return \Response::make($view);
 }
Exemplo n.º 5
0
 public function export($identifier = null)
 {
     // Request all the users
     $sentry_data = \Sentry::findAllUsers();
     // Push them in an array
     $users = array();
     foreach ($sentry_data as $u) {
         // Get user's groups
         $sentry_groups = $u->getGroups();
         // Include password hash
         $password = $u->password;
         // Transform to array
         $u = $u->toArray();
         // Add password hash
         $u['password'] = $password;
         // Add group names
         $u['groups'] = array();
         foreach ($sentry_groups as $g) {
             array_push($u['groups'], $g->name);
         }
         array_push($users, $u);
     }
     return $users;
 }
Exemplo n.º 6
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //GET
     if ($id == "groups") {
         $this->layout->title = APPNAME;
         $groups = Sentry::findAllGroups();
         $this->layout->content = View::make('main.admin.groups')->with('groups', $groups);
     } elseif ($id == "users") {
         $this->layout->title = APPNAME;
         $users = Sentry::findAllUsers();
         $this->layout->content = View::make('main.admin.users')->with('users', $users);
     }
 }
Exemplo n.º 7
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $data = array('field' => array('email', 'first_name', 'last_name', 'last_login'), 'values' => Sentry::findAllUsers());
     return Response::json($data);
 }
Exemplo n.º 8
0
 public function findAllUsers()
 {
     return Sentry::findAllUsers();
 }
Exemplo n.º 9
0
 public function showUsers()
 {
     $users = \Sentry::findAllUsers();
     return \View::make('admin::users.users_list', compact('users'));
 }
Exemplo n.º 10
0
 /**
  * Displays all users
  *
  * @return response
  **/
 public function getUsers()
 {
     $users = Sentry::findAllUsers();
     return View::make('account.users', compact('users'));
 }
 /**
  * @brief gets all users
  *
  * @return Mixed
  */
 public function getUsers()
 {
     $users = \Sentry::findAllUsers();
     foreach ($users as $user) {
         $throttle = \Sentry::findThrottlerByUserId($user->id);
         $user['suspended'] = $throttle->isSuspended();
         $user['banned'] = $throttle->isBanned();
         $user['activated'] = $user->isActivated();
     }
     return $users;
 }
Exemplo n.º 12
0
 public function index()
 {
     $this->layout->title = 'Usuarios';
     $this->layout->content = View::make('administrator.users.list')->with('users', Sentry::findAllUsers());
 }
Exemplo n.º 13
0
 public function index()
 {
     return View::make('admin.users.index')->with('users', Sentry::findAllUsers());
 }