× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
creating a user dossier

I am trying to create a sort of user dossier. I'd like it to contain the info from _admin_user.php but be presented like the account.php.
How would I go about this?

I know I need something like this line: ?view=user&id=<?=$v1->id?>'><?=$v1->username?>, to show the data from a particular user. But I can't figure out how to get it to work.

Any ideas?
Does anyone have any tips?
Are you wanting to see information for The logged in user or for all users?
Hello Mudmin, thank you for responding Smile

I would like to create a link in the _admin_user to the dossier of that user.

So that link opens a new page (the dossier) where all the info ( with possibly some more info gathered from the database) from that particular user is displayed like it is in the account.php

I created that link to the dossier, and when it opens it shows the ID of that user in the address bar, but I cannot seem to create the code to actually display the info of that ID (it just shows my own info, as I am logged in).

Does that make any sense?
Ok. Sure. So let's walk through that.

Let's say you have a page called dossier.php and you are calling that page as dossier.php?id=3 (the user's id).

Your code would look like this...

So what I did there is grabbed the id from the URL and did a query of the users table where the user id was that number. If you have your data stored in a different table, just change the table in the infoQ query.

Then I made a table to show all the data. If you only want to echo out certain data, you don't need the foreach loop. You can just do echo $info->columname;

Hope that helps.
Yes! That totally works Smile)
Thank you Mudmin!

On another note...my users are suddenly not redirected properly to their usersc/account.php
As an Admin I get redirected fine, but as a user I am not.

Any idea what the problem could be?
Can you check your database under settings and redirect_uri_after_login?
If that still has usersc/account.php (or users/account.php) then check this file...
usersc/scripts/custom_login_script.php and see if anything is happening in there that would cause an issue.
I changed the redirect after login to a member_index page through the User Settings in the Dashboard. That works fine.
I have checked the file you mentioned and that says the standard thing (as I did not touch that):

I have my website on another domain as well and on that one the redirect for users works fine. I must have changed something somewhere, so I cross checked account.php, custom_login_script.php, nav.php, navigation.php and they all seem fine. I also looked at all the settings in the dashboard and the problem does not seem to be there either. Neither has it to do with cookies..or so it seems.

I am at a loss   Undecided
Mudmin, Brandin? Any thoughts on where I may have screwed up with this?

Forum Jump:

Users browsing this thread: 1 Guest(s)