The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
After Registration/Signin auto redirect url question
#1
Hello,

I looked in forums, but may have missed an answer to this question.

It really is 2 questions maybe, but they are inter-related as far as what I would like to have userspice help me with.

I am using userspice solely for gathering a database of users. I am creating an app that I want to gather registration info for people who will use the app. ( Note-Noob-I don't know how to integrate my jquery pages with the userspice interface).
Users can use the app even without registering currently, but I am just winging it for now while learning, hoping a popup prompt will at least help me get people to register so I have some sort of user data.

Navigation-
user goes to app web site
registers ( In settings I chose everything with the least amount of setting required to get a user register)
after registration - a user has to Login
Question 1- I there a way after a successful registration ( No email confirmation required) that it will auto log the person in and then redirect to my app home page?
Question 2 - nearly same idea- after singing in, or google auth, redirect to a page on my same domain?

I would like it to redirect to my app home page again.

Thank You,

Wayne
  Reply
#2
Register - In version 4.3 and up, there is a file called
usersc/includes/scripts/during_user_creation.php

It's at the perfect spot for what you need.
Put this code at the bottom (editing your redirection page).
Code:
$user = new User();
Code:
$login = $user->loginEmail(Input::get('username'), trim(Input::get('password')), 'off');
Code:
if ($login) { Redirect::to('mypage.php');}

For facebook, you put your redirect after login on the admin dashboard under social logins.
For the others, you put it in usersc/includes/scripts/custom_login_script.php

I think that about covers it. Let me know if you have any issues.
  Reply
#3
You can forget that 3rd line in my code sample above. The code will never hit it (although you could do an error message for if !login

You change where the user goes after login in usersc/scripts/custom_login_script.php
  Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)