Welcome to Geeklog Tuesday, October 17 2017 @ 11:15 am EDT


Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany

This is something that has been requested before and since I needed it myself recently, I hacked the code from admin/user.php a bit to make a (simple) user list. Of course, it does not display email addresses and I also made it so that only logged-in users can view the list.

You can view the source or download it from geeklog.info. Have fun.

bye, Dirk


Status: offline

greatgerm

Forum User
Newbie
Registered: 05/09/2002
Posts: 7
Since I'm still a little new to php and a lotta new to GL I guess the best thing to do is ask. How would I need to hack this to get the users seperated into the groups they belong to? Or even better be able to choose the group you want to look at.

Anonymous

Anonymous
May I ask, how do you apply it? Sam

Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
This is very useful. Thanks Dirk! A question. What is the best way to link this url? Create a link under "Sections" or is it possible to add it to "Admins Only" Block? Are you aware of that even after you signed out, you still can access to this page? Plus, it automatically sign you in. That's sort of dangerous because if someone after me click on it and mass around with administration like changing my user password. I hope this will become a standard feature in version 2. Sam

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
For the one site where I use it, I just hard-coded a link to it in the menu bar in header.thtml. There's no need to add it to the Admin menu since the Admin already has a user list ... Not sure what you mean by "it automatically sign you in". Nobody can take over the admin account without your password (or the cookie on your browser). bye, Dirk

Anonymous

Anonymous
I have added it under "Admins Only" block. One reason is that I only want the admin users (usually the group leaders) to see it. They are not given the User Admin permission so they don't get the regular "Users" link in their menu. Another reason is I like your conveniant "Send Email" link, that I don't have on the default "Users" listing and editing page. It is useful when I want to send an email just to an idividual. I have fixed the problem of automatic sign in problem. After all it is a very useful feature to have. Thanks, Sam

Status: offline

rayban

Forum User
Newbie
Registered: 20/10/2003
Posts: 1
mellow
A note of thanks to Dirk for this. Good on you.

Thank you,

Ray

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/2004
Posts: 68
Dirk, where do you put the file 'userlist.php'? Or did you put this code into the lib-custom.php file?

John

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Quote by johnjr: Dirk, where do you put the file 'userlist.php'?

Just drop it into your public_html directory. You'll have to add a link to it manually somewhere, e.g. in the menu or from a block.

bye, Dirk

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/2004
Posts: 68
Works nicely! Thanks Dirk.

I am interested in trying to limit the User List that is displayed, to only those users that are assigned to a particular Group, instead of showing all Logged In Users. Any suggestions on how to do that, easily? Ideally, the User List would only show the Users who are part of the same Group (or Groups) of the User who is 'viewing' that List.

John

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Quote by johnjr: I am interested in trying to limit the User List that is displayed, to only those users that are assigned to a particular Group

That stuff is a bit tricky ... As the Admin, you have such a list in the list of groups (second column from the right). You'll have to lift the code for that from admin/group.php, function listusers()

bye, Dirk

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/2004
Posts: 68
How about having the SQL lookup in the User List code, only look up records where the user belongs to the specific desired group? Which field in the sql table is this information kept? Obviously, if I wanted the code to 'find' users who belong to a different group, I would have to hard-code another 'version' of the User List 'program'.

John

Status: offline

thedude

Forum User
Regular Poster
Registered: 28/12/2002
Posts: 90
cheerful
This solved my current needs.

Many thanks Dirk. As usual, Great Jobs...

The Dude

Status: offline

Blaine

Forum User
Full Member
Registered: 16/07/2002
Posts: 1233
Location:Canada
Just as a note: You also have a memberlist feature with the forum plugin. Under the forum features in your user block and it has sortable headings - click a heading again to reverse the order.
Geeklog components by PortalParts -- www.portalparts.com

"I

Anonymous
Hi, it works great, but is there a way to have it sort by the date of when a user joined? I get so lost looking in between the admin list and that list.

Status: offline

Katsuhito

Forum User
Newbie
Registered: 02/03/2007
Posts: 5
Dirk, Your userlist.php is a great hack. But I’d like to include the user’s lastlogin date. How can I do this? I'm a novice at php, and getting better Big Grin but I know almost nothing about SQL.

Status: offline

orepa

Forum User
Chatty
Registered: 07/11/2007
Posts: 35
Dirk,

How/where do I add the homepage and location to the "simple list" script so it will also display the information added to those fields? If somone else knows how to add those two fields, please advise.

Thanks,

All times are EDT. The time is now 11:15 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content