CodeIgniter Forums
Myth\Auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Myth\Auth (/showthread.php?tid=77539)



Myth\Auth - nc03061981 - 09-12-2020

Dear,
I using MythAuth
I do not want use Email
How i config for only use Username, no Email, no Activate by email
Thanks for help


RE: Myth\Auth - InsiteFX - 09-13-2020

Not tested but from the comment in the Config/Auth.php

In Config/Auth.pp add this:

PHP Code:
// Remark this out so that you do not lose it.
// public $requireActivation = 'Myth\Auth\Authentication\Activators\EmailActivator';

// Add this:
public $requireActivation false

I did look at the registration code and that is what tells it not to send and email.

Good Luck.


RE: Myth\Auth - nc03061981 - 09-13-2020

@InsiteFX
Thanks for help
And as your answer, i find
$this->config->requireActivation !== false ? $user->generateActivateHash() : $user->activate();

Thanks thanks


RE: Myth\Auth - InsiteFX - 09-13-2020

Right but if you set the Auth config item to false it should not send the email.


RE: Myth\Auth - nc03061981 - 09-13-2020

(09-13-2020, 12:00 PM)InsiteFX Wrote: Right but if you set the Auth config item to false it should not send the email.

Thanks,


RE: Myth\Auth - anup - 05-11-2022

Not sure if this is still relevant. W head a similar use case where we do not want to capture user emails at all. In addition to following the given instructions on the thread, we also had to comment out the email field from the $validationRules property of the UserModel. We did this by extending the UserModel to create a new Model in our app Namespace and then overriding this property without the email in that new model and using that model at most of the places. This worked for us, but I am not sure if this is the right way to go. Any suggestions will be appreciated.


RE: Myth\Auth - MGatner - 05-15-2022

@anup you might want to take a look at the upcoming CodeIgniter Shield auth solution, as it intentionally decouples user identities (like email) from the functions.


RE: Myth\Auth - stipica - 09-23-2022

...so i have myth-auth worked in previous project. It was version 1.0-beta.3.

I am now trying to use version v1.2.0. Installation worked fine but when I try to register new user I got an error:

Class 'CodeIgniter\Entity\Entity' not found

I don't have any idea what am i doing wrong.
Here is the screenshot, please give some advice:


[Image: ci4-error.png]


RE: Myth\Auth - gosocial2 - 10-14-2022

The screenshot didn't come through. Can you try posting it again? Or the complete stack trace of the exception?