Jump to content

Get users


yesjoar
 Share

Recommended Posts

Hi there,

is it possible to became all backend users in the frontend?

$user worked only for the current user. I thought there is something like $page and $pages.

When I try var_dump($user) and var_dump($users) I became different results, but in both results there are not the other users.

I think there is no function for that yet, but is it possible to get acces on a other way?

I need a way to change some fields of a special user in the frontend.

y.

Link to comment
Share on other sites

Okay, now i display all users with a special content in given field.

That works fine for me. But when I want to change the role of each user i've found.

 $allusers = $users->find("field=xyz");
 foreach($allusers as $u){
  $u->removeRole('oldrole');
  $u->addRole('newrole');
  $u->save();
 }

But $u is a valid user object, or not?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...