Advertisement:

Author Topic: Login website returns to Admin page => FIX  (Read 3802 times)

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Login website returns to Admin page => FIX
« Reply #15 on: September 07, 2015, 12:33:32 pm »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Login website returns to Admin page => FIX
« Reply #16 on: September 07, 2015, 04:17:35 pm »
Coolio! :)

Thanks dev101

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Login website returns to Admin page => FIX
« Reply #17 on: September 07, 2015, 04:35:54 pm »
Thank you, SmaRTeY and YW :)

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Login website returns to Admin page => FIX
« Reply #18 on: September 28, 2015, 01:00:13 pm »
Well, it didn't lasted long, didn't it? :)

After some time, definitively can confirm that the problem now seems to be reversed: If not logged-in admin works as a user at frontend, and in the middle of the session logs-in as admin, the user part will be logged-out/destroyed automatically. Now, it really depends which one annoys you less (I assume modification, so I left PR open).

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Login website returns to Admin page => FIX
« Reply #19 on: September 28, 2015, 07:26:26 pm »
Hi dev101,

I noticed that as well but it doesn't bother me as I am used to login and logout again before changing to Admin or User.
Actually I think this is by design ie. using only one browser/IP the session is always terminated with regard to requests coming from that one browser.

I AM able to use both Admin and logged-in user using two browsers but once I log out of either it seems the session gets destroyed so I assume this is because the session is IP based but I am just guessing.


Regards,
Eric

Guib

  • Jr. Member
  • **
  • Posts: 92
Re: Login website returns to Admin page => FIX
« Reply #20 on: October 13, 2015, 02:35:42 pm »
Hi.

I have test with the new file (https://raw.githubusercontent.com/dev-101/Osclass/patch-13/oc-includes/osclass/controller/login.php)
But it work just one…

I have test with the original file and just change the line 100, it's ok.

Normal or not normal?

I put this code on the line 100
$url_redirect = osc_user_dashboard_url();  //AVANT - BEFORE SEPT 2015 osc_get_http_referer

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Login website returns to Admin page => FIX
« Reply #21 on: October 14, 2015, 08:17:13 pm »
Hi Guib,

with the code: $url_redirect = osc_user_dashboard_url();  //AVANT - BEFORE SEPT 2015 osc_get_http_referer
you will actually *break* the option of using referrals in external links so for example using the offerbutton plugin, that will sent an email containing a link + referral to users. As soon as the link is clicked the browser is opened and the user is directed to the login page before sent through to the offerbutton page. That functionality will no longer work with your code change if I am correct.

Regards,
Eric

Hi.

I have test with the new file (https://raw.githubusercontent.com/dev-101/Osclass/patch-13/oc-includes/osclass/controller/login.php)
But it work just one…

I have test with the original file and just change the line 100, it's ok.

Normal or not normal?

I put this code on the line 100
$url_redirect = osc_user_dashboard_url();  //AVANT - BEFORE SEPT 2015 osc_get_http_referer

Guib

  • Jr. Member
  • **
  • Posts: 92
Re: Login website returns to Admin page => FIX
« Reply #22 on: October 15, 2015, 09:30:17 am »
Thanks ;)

There are no solution ?!

786sujit

  • Newbie
  • *
  • Posts: 38
Re: Login website returns to Admin page => FIX
« Reply #23 on: October 17, 2015, 11:59:27 pm »