Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tank_auth to Aauth #18

Closed
morcegon opened this issue Aug 14, 2014 · 2 comments
Closed

Tank_auth to Aauth #18

morcegon opened this issue Aug 14, 2014 · 2 comments
Labels

Comments

@morcegon
Copy link

Hello!

Is there a way to migrate the users with same hashes in use on my application to Aauth?

Thanks.

@REJack
Copy link
Collaborator

REJack commented Aug 15, 2014

No way Tank_auth use "phpass" to generate the hashes.
Its not recalculateable, you can just brute-force the hashes and generate then new hashes from the brute-forced hashes.
Or the easy and right way
Copy the name and email adress with empty 'pass' and 'verification_code' fields and the use the lil' code it would send new passwords to all users who has no password after migration

public function complete_migrate(){
    foreach($this->aauth->list_users() as $user){
        $user = get_object_vars($user);
        if($user['verification_code'] == '' && $user['pass'] == ''){
            $this->aauth->reset_password($user['id'],''); 
        }
    }
}

If use the Aauth-Lib then fix in Line 383 'alphanum' to 'alnum' then the users go a password.
It got be fixed with the next merge i think.

@emreakay
Copy link
Owner

@REJack is right. i have take a look at tank_auth and see that the poswords fields in database cannot be decrypted. Thus it's better to use @REJack 's solution. You can reset all user paswords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants