1
biomech
User profile link takes me to my OWN profile.. ?
  • 2011/1/4 10:16

  • biomech

  • Not too shy to talk

  • Posts: 161

  • Since: 2002/2/25


I recently switched my site from allowing users to authenticate their own accounts at registration to requiring the admins to authorize the new registration. So now when a new user registers, I get an email that looks like this:

=====
Hello AdminUserName,

A new user NewUserName (new@email.com) has just registered an account at This Awesome Website.

Clicking on the link below will activate the account of this user:

http://www.mysite.org/modules/profile/activate.php?id=4964&actkey=d9471233
=====

I wanted the email to include a link to the new user's profile so that I can have a quick look at it before I approve the registration, so I altered registration.php so that now the email I get is the same as above, but with the addition of this line:

=====
The user's profile can be viewed here:
http://www.mysite.org/modules/profile/userinfo.php?id=4964
=====

What is weird is that when I click on that link, it takes me to my OWN profile. My user id is 1. I can't understand why accessing the above URL with the user id of 4964 would take me to my own profile page.

Can anyone explain this?

Thanks,
- b -



2
redheadedrod
Re: User profile link takes me to my OWN profile.. ?

Before you click on this link try making sure you have a window open in the browser you are using and that you are logged in.

What I am suspecting is happening is when you click on it and go to your site you are not logged in. Your browser automatically logs you in or you log in and that process is erasing that information so when it goes back to profile it is using the default ID which is yours when you log in.

By logging in before you click on the link you are already logged in and the session data will not be affected and clicking on that link SHOULD take you to the user.


Seems like I had a problem like this and that's what I found.

Atleast worth a shot.

Rodney

3
biomech
Re: User profile link takes me to my OWN profile.. ?
  • 2011/1/6 0:28

  • biomech

  • Not too shy to talk

  • Posts: 161

  • Since: 2002/2/25


Hi Rodney,

I had tried that originally, and just did again to confirm.

1)Logged in.
2) Clicked on the profile link in the email
3) The browser loads my profile page - and the browser URL bar shows the URL containing the ID number of the new user. I don't get it. The browser is showing the URL of the new user's profile, but it's my own profile that's being displayed.

(I also tried clearing the browser cookies and trying again, but no luck.)

Confused,

- b -

4
ghia
Re: User profile link takes me to my OWN profile.. ?
  • 2011/1/6 11:40

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I don't think you can use the profile module to inspect not yet activated accounts. I think you need a URL of the edit user from system admin to do that /modules/system/admin.php?fct=users&op=users_edit&uid=12345

5
biomech
Re: User profile link takes me to my OWN profile.. ?
  • 2011/1/18 2:07

  • biomech

  • Not too shy to talk

  • Posts: 161

  • Since: 2002/2/25


Thanks ghia - that worked for me!

Login

Who's Online

351 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits