Welcome Guest, Not a member yet? Register   Sign In
Tank Auth v1.0 (CI authentication library)

[eluser]taurine[/eluser]
In using /auth/send_again, in an attempt to get the activation link after registering, I get a blank email with an attachment named 'noname'. There is nothing in the attached 'noname' file that I receive in my email. Can anyone help? The code is very verbose for me (everything is split apart among config files, language files, etc), and I'm having difficulty wrapping my head around it.

*update* I noticed that there is a folder full of email views, for both html and text. So in my config, I changed mailtype to text. Now I'm receiving emails with content inside, albeit html code... The _send_email function doesn't respect this config setting.

*update 2* Tried both yahoo and gmail. When HTML is set on, the email received is blank. Gmail will allow me to see the full header though (kind of), and from that, the alt_message DOES seem to be getting attached. But since gmail and yahoo accept HTML emails, they are ignoring the alt_message.

If nobody else is having this problem, my guess is it's my WAMP environment combined with SMTP settings (my ISP and port 25 via ini_set()). The problem will hopefully go away when uploaded to my real server, dreamhost.

*update 3* Made 2 small changes to email function, so now it will respect mailtype in the config. Mine is set in config/email.php
Code:
function _send_email($type, $email, &$data)
    {
        $mailtype = ($this->config->item('mailtype','email') == 'html') ? 'html' : 'txt';
        $this->load->library('email');
        $this->email->from($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));
        $this->email->reply_to($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));
        $this->email->to($email);
        $this->email->subject(sprintf($this->lang->line('auth_subject_'.$type), $this->config->item('website_name', 'tank_auth')));
        $this->email->message($this->load->view('email/'.$type.'-'.$mailtype, $data, TRUE));
        $this->email->set_alt_message($this->load->view('email/'.$type.'-txt', $data, TRUE));
        $this->email->send();
    }

All is working well now. Change #1, I added a line setting $mailtype depending on the config. For change #2, where it said '-html', I changed that so it dynamically says either -html or -txt, using the $mailtype variable we created. That's it!

[eluser]AskoJr[/eluser]
Holy crap, dude... This is exactly what i needed, been shooting my brains on the wall for 2 days straight now with a perfect auth systems that actually works... and this my friend, this is pure gold. All i hope is that you can maintain it for long and update it, if not... pass it along to someone else who can or so.

[eluser]insub2[/eluser]
I'm trying to figure out why a non-activated user is allowed to login?

[eluser]chefnelone[/eluser]
Just to say thanks, I implemented it in my site and working like a charm. Please let's keep this library updated.

[eluser]Agung Wahyudiono[/eluser]
[quote author="brettalton" date="1284750048"][quote author="lolmann" date="1284732972"]He there,

I like tank_auth a lot but i have a trouble getting it to work on a server - it worked fine on my local machine.

The problem is, Phpass doesn't seem to hash the passwords. So when comparing a password submitted at login to the (hashed) password in the database it fails. Somebody suggested that the problem could be that my server doesn't support the encryption method. But I don't know how to change it.

Here are some more details: http://ellislab.com/forums/viewthread/167507/

Any idea how this can be resolved?[/quote]
I would say just don't move your database from localhost to the server (or TRUNCATE the `users` table (as in empty it) so when you re-register, phpass will use the authentication system native to that server.

Remember phpass will try and use two different php-supported algorithms before going to a hand-written method. Thus, if your localhost is using algorithm, and your server is using another, the two password hashes will not match.[/quote]

I have the same problem with him. And now what should I do, so i can get login into my page.

[eluser]Johnny Freeman[/eluser]
This thread is quite long now so I just read the first few pages and skipped to the end. Has anyone had any luck converting this for CodeIgniter 2? Great library by the way!

[eluser]mdvaldosta[/eluser]
To get it working with 2.0 I've renamed the 3 models for tank_auth to extend CI_Model instead of Model, and changed $this->load->plugin('captcha') to $this->load->helper('captcha') on line 499 of the auth.php controller. Also, on line 45 of auth.php change $login = $this->input->xss_clean($login) to $login = $this->security->xss_clean($login)

*edit - actually changing the login to use security instead of input still didn't work, I get an error about calling a non-object. So I just commented out the code until someone else can chime in.

[eluser]mdvaldosta[/eluser]
Bump, anybody have a solution for CI2?

[eluser]Unknown[/eluser]
[quote author="mdvaldosta" date="1287608505"]To get it working with 2.0 I've renamed the 3 models for tank_auth to extend CI_Model instead of Model, and changed $this->load->plugin('captcha') to $this->load->helper('captcha') on line 499 of the auth.php controller. Also, on line 45 of auth.php change $login = $this->input->xss_clean($login) to $login = $this->security->xss_clean($login)

*edit - actually changing the login to use security instead of input still didn't work, I get an error about calling a non-object. So I just commented out the code until someone else can chime in.[/quote]

Security is a library. You have to add
Code:
$this->load->library('security');
before the call to
Code:
$this->security->xss_clean($login)

[eluser]33cent[/eluser]
Download Tank-Auth for CI 2.0:
Code:
http://hotfile.com/dl/81307371/750e2c4/tankauth-for-CI20.zip.html

Changelog:
- patched auth.php for CI 2.0 compatibility
- patched modules for CI 2.0 compatibility




Theme © iAndrew 2016 - Forum software by © MyBB