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
/printthread.php 16 require_once



UserSpice
How to automatically login in new accounts? - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: How to automatically login in new accounts? (/showthread.php?tid=824)



How to automatically login in new accounts? - radke - 11-09-2017

Wondering if someone more experienced (that's just about everyone) can point me in the right direction here.

For my needs I disabled email verification of new accounts. So when a new account is created it would be great to just automatically login that user, bypassing login.php.

I feel like this post put me on the right path with passing the username/pass via $_Post to login.php but I can't quite seem to get it to work.

Can anyone help me out with this?

Also, maybe this would would be a good thing to add as an option in UserSpice? This seems like something most people would want if they don't want email verification.

Thanks!!


How to automatically login in new accounts? - Brandin - 11-09-2017

You should be able to create a session without doing a check on the password. I would copy your join page to usersc, and modify the code for after it does all the jibber jabber, run the functions that login.php does if the password matches, such as new User, session creation, etc. Let me know if you need any more assistance.


How to automatically login in new accounts? - radke - 11-09-2017

That did it! Thank you for your help Brandin!


How to automatically login in new accounts? - Brandin - 11-10-2017

My pleasure! I am glad it made sense! Smile