![]() |
Shield: check user isActivated() do not work properly by using custom action register - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Shield: check user isActivated() do not work properly by using custom action register (/showthread.php?tid=91845) |
Shield: check user isActivated() do not work properly by using custom action register - SonzoXide - 10-22-2024 Hi guys. I need little help for this case. I am using custom action for register, like this one below: PHP Code: public array $actions = [ and it works properly. but when i wanna to check if the user is already active or not by using auth()->user()->isActivated() or auth()->user()->isNotActivated() it return differently from active properties. PHP Code: /** @var Session $authenticator */ result: Code: ['isActivated' => true, 'isNotActivated' => false, 'active' => false] or am i doing it wrongly? Thank you in advanced. RE: Shield: check user isActivated() do not work properly by using custom action register - datamweb - 11-30-2024 The output when the value is set to 'register' => \CodeIgniter\Shield\Authentication\Actions\EmailActivator::class, is as follows for me: Code: auth()->user()->isActivated() boolean false So, it seems that you might have missed something. |