The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× 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
handle existing join+login page
#4
Dealing with google/fb might be the easiest part of it because we do those with their own includes. So let's take a look.

Let's say you have

mydomain.com
mydomain.com/youroldfiles
mydomain.com/users (The bulk of the userspice files)

Let's say you have your login page (just for reference at)
mydomain.com/youroldfiles/yourlogin.php

If you open OUR login.php file and go to lines 117-124, you'll see that just above our actual login form, we have

Code:
<?php
Code:
if($settings->glogin==1 && !$user->isLoggedIn()){
Code:
require_once $abs_us_root.$us_url_root.'users/includes/google_oauth_login.php';
Code:
}
Code:
if($settings->fblogin==1 && !$user->isLoggedIn()){
Code:
require_once $abs_us_root.$us_url_root.'users/includes/facebook_oauth.php';
Code:
}
Code:
?>

That is all of our fb/google logic being included. So you could put that on your own login form in one of two ways...
1. Change the require once statements to "back out" of your folder and go over to the UserSpice folder.
Code:
require_once '../users/includes/google_oauth_login.php';

2. Put in the full url
Code:
require_once 'http://mydomain.com/users/includes/google_oauth_login.php';

I hope that helps.
  Reply


Messages In This Thread
handle existing join+login page - by yuma - 01-04-2017, 05:46 PM
handle existing join+login page - by mudmin - 01-04-2017, 05:55 PM
handle existing join+login page - by meetmec12 - 01-08-2017, 08:47 AM
handle existing join+login page - by mudmin - 01-08-2017, 04:33 PM
handle existing join+login page - by meetmec12 - 01-10-2017, 11:25 AM
handle existing join+login page - by mudmin - 01-11-2017, 12:32 AM
handle existing join+login page - by JUG - 03-13-2017, 10:14 AM
handle existing join+login page - by mudmin - 03-13-2017, 02:14 PM
handle existing join+login page - by JUG - 03-14-2017, 12:14 PM
handle existing join+login page - by mudmin - 03-14-2017, 02:25 PM
handle existing join+login page - by JUG - 04-19-2017, 09:06 AM
handle existing join+login page - by mudmin - 04-20-2017, 10:34 AM
handle existing join+login page - by JUG - 04-21-2017, 06:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)