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

It would be helpful to be able to map the database column names for table "user"? #68

Closed
antranapp opened this issue Feb 26, 2013 · 3 comments

Comments

@antranapp
Copy link

My "user" table doesn't have primary column named "user_id" , it is called "id" . Right now i have changed query

SELECT * from user_table

to

SELECT *, id as user_id from user_table

so that user_id is updated correctly in in access_token table. It woud be helpful if we can via configuration map the column name for "user" table.

@dsquier
Copy link
Contributor

dsquier commented Feb 26, 2013

You'll likely need to make other changes to Pdo.php in order to integrate the library, so I'd just replace * with the columns required and alias id to user_id like you did, i.e.:

SELECT id user_id, email, password, oauth_client_id FROM user WHERE email = :email

@bshaffer
Copy link
Owner

bshaffer commented Mar 2, 2013

PDO is supposed to be a stub class. You should definitely extend this in your application in order to make it appropriate for your specific requirements

@bshaffer bshaffer closed this as completed Mar 2, 2013
@antranapp
Copy link
Author

the properties $db & $config in class "OAuth2_Storage_Pdo" are "private" and not "protected" so that i always receive error "Undefined property: New_OAuth2_Storage_Pdo::$db" when i try to extend the "OAuth2_Storage_Pdo" class

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

No branches or pull requests

3 participants