我如何告诉 Tank Auth 根本不激活用户?
对于我正在创建的 CodeIgniter 项目,用户必须在注册后由管理员手动激活。
目前我正在使用 Tank Auth (http://www.konyukhov.com/soft/tank_auth/< /a>) 用于用户身份验证,并且似乎缺少此特定设置。有没有可能我只是没有找到设置?如果没有,我将如何(以及在哪里)自己开始编写该功能?
For the CodeIgniter project I'm creating, it is necessary that users get activated manually by an admin after registering.
Currently I'm using Tank Auth (http://www.konyukhov.com/soft/tank_auth/) for user authentication, and it seems to be missing this particular setting. Is there any chance I just didn't find the setting? If not, how (and where) would I start coding that feature myself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您对快速破解感兴趣,我认为这会起作用。
查看 application/config/tank_auth.php 并确保 $config['email_activation'] 设置为 TRUE。
然后在 application/controllers/auth.php sign_up 方法中查找这一行:
$this->_send_email('activate', $data['email'], $data);
将 $data['email'] 更改为管理员的电子邮件地址。所以你最终会得到这样的结果:
$this->_send_email('activate', '[电子邮件受保护] ', $数据);
然后,当用户注册时,管理员将收到一封电子邮件,其中包含用于激活用户的激活链接。
If you're interested in a quick hack, I think this would work.
Look in application/config/tank_auth.php and be sure that $config['email_activation'] is set to TRUE.
Then in the application/controllers/auth.php sign_up method look for this line:
$this->_send_email('activate', $data['email'], $data);
Change $data['email'] to the admin's email address. So you end up with something like this:
$this->_send_email('activate', '[email protected]', $data);
Then when users sign up, an email will come to the admin with the activation link to activate the user.