Hi there.
Following this thread I’m trying to programatically log in a user on accessing a certain template with a hash in the URL which is used to look up the member ID. At the moment I’m using the “session_start” hook in EE 4.2.1 but this just throws the following error …
Exception Caught
No such property: 'session' on EllisLab/ExpressionEngine/Legacy/Facade
ee/EllisLab/ExpressionEngine/Legacy/Facade.php:114
Stack Trace: Please include when reporting this error
#0 ee4system\ee\EllisLab\ExpressionEngine\Legacy\Facade.php(29): EllisLab\ExpressionEngine\Legacy\Facade->get('session')
#1 ee4system\ee\legacy\libraries\Auth.php(719): EllisLab\ExpressionEngine\Legacy\Facade->__get('session')
#2 ee4system\user\addons\custom_extensions\ext.custom_extensions.php(53): Auth_result->start_session()
etc
I assume this is because this has changed in EE4 so what would I need to do with EE4 to do this with a member ID? Or would a different hook work better?
I am aware of the potential risks involved in programatically logging in a user but the client has asked me to research this idea so there it is.
Thanks!
, This is a great article. It gave me a lot of useful information. thank you very much. Link profile: https://dakhoaauahcm.vn/benh-cham-la-gi.html
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.