For the CodeIgniter project I'm creating, it is necessary that 开发者_如何学Cusers 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?
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', 'admin@example.com', $data);
Then when users sign up, an email will come to the admin with the activation link to activate the user.
精彩评论