Welcome Guest, Not a member yet? Register   Sign In
Datamapper user..what auth library do you use?
#1

[eluser]Mantero[/eluser]
for datamapper user, what authentication library did you use?

I still can't figure auth how to integrate existing library such as Tank auth with datamapper

#2

[eluser]WanWizard[/eluser]
There is really no need to integrate anything.

The only thing you need to do (if you want to access the auth tables inside your application) is to create models for those tables. Which would require the table layout to be Datamapper compliant.

I know IonAuth works, have no experience with Tank.
#3

[eluser]Mantero[/eluser]
[quote author="WanWizard" date="1333972376"]There is really no need to integrate anything.

The only thing you need to do (if you want to access the auth tables inside your application) is to create models for those tables. Which would require the table layout to be Datamapper compliant.

I know IonAuth works, have no experience with Tank.[/quote]



the problem is Tank Auth already has a default User table in database, and default Users model which extends CI_Model


my question is, how do I define a Datamapper model for User table?


thanks for your help
#4

[eluser]WanWizard[/eluser]
Yes, so?

As long as that Users table has a primary key called 'id', you can create a Datamapper model for it.

Code:
class Randomname extends Datamapper
{
    public $table = 'Users';
}

// and then

$users = new Randomname():
$users->where('username', 'John')->get();




Theme © iAndrew 2016 - Forum software by © MyBB