| Issue 1: | Problem adding clients in example pdo_oauth.php |
1 of 8
Next ›
|
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Visit addclient.php
2. Fill out the three fields
3. Click Submit
Expected to see the row added to the `clients` table. No row is added.
The fix is to change the variable name in the function declaration on line 40 of pdo_oauth.php to $pw instead of $secret.
@@ -37,7 +37,7 @@
// Little helper function to add a new client to the database
// Do NOT use this in production! This sample code stores the secret in plaintext!
- public function add_client($client_id, $secret, $redirect_uri) {
+ public function add_client($client_id, $pw, $redirect_uri) {
try {
$sql = "insert into clients (client_id, pw, redirect_uri) values (:client_id, :pw, :redirect_uri)";
$stmt = $this->db->prepare($sql);
Aug 3, 2010
Project Member
#2
aaron.parecki
|