Changeset 161
- Timestamp:
- 03/20/08 14:33:36 (10 months ago)
- Files:
-
- branches/RB-0.91/wp-infocard/pw-config.php (modified) (1 diff)
- branches/RB-0.91/wp-infocard/site-messages/en-us/associated-new-card.html (added)
- branches/RB-0.91/wp-infocard/wp/admin.pw.php (modified) (2 diffs)
- branches/RB-0.91/wp-infocard/wp/processing.pw.php (modified) (2 diffs)
- branches/RB-0.91/wp-infocard/wp/userdata.pw.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/RB-0.91/wp-infocard/pw-config.php
r158 r161 12 12 define ('PW_USECAPTCHAS', false ); 13 13 define ('PW_DEBUG_ON', get_settings('pw_debug_on')); 14 define ('PW_DEBUG_LEVEL', ' 0');14 define ('PW_DEBUG_LEVEL', '2'); 15 15 define ('PW_SELECTOR_TRIGGER', get_settings('pw_selector_trigger')); 16 16 define ('PW_CUSTOM_DATA', get_settings('pw_custom_data')); branches/RB-0.91/wp-infocard/wp/admin.pw.php
r159 r161 598 598 . date( 'd M Y, g:ia T', strtotime($card->lastused)) . "</td><td>" 599 599 . "<a href=''>Verify</a></td><td>" 600 . "<a href=''>Delete</a></td></tr>\n"; 601 602 600 . pw_admin::cardDeleteUrl($card->cardhash, $card->cardhandle) . "</td></tr>\n"; 603 601 } 604 602 //$handle = pw_processing::getCardHandle( $current_user->ID ); … … 630 628 return PW_SECUREPLUGINURL . '/' . PW_PLUGIN . '/login/infocard-newcard.php'; 631 629 } 630 /* 631 Function: cardDeleteUrl 632 Description: creates and returns a string containing the url that a user can click on to delete a card 633 */ 634 function cardDeleteUrl($cardhash,$cardhandle) 635 { 636 $action_url = PW_SECUREPLUGINURL . '/' . PW_PLUGIN . '/login/infocard-delete.php'; 637 //return '<a href="' . wp_nonce_url($action_url . '?card=' . $cardhash) 638 return '<a href="\'' 639 . '" onclick="confirm(' 640 . js_escape(sprintf(__("You are about to delete an information card with the handle of '%s'.\n'Cancel' to stop, 'OK' to delete."), $cardhandle)) 641 //. '\'test\'' 642 . '\');">' . __('Delete') . '</a> '; 643 //return PW_SECUREPLUGINURL . '/' . PW_PLUGIN . '/login/infocard-newcard.php'; 644 } 632 645 } // end class pw_admin 633 646 ?> branches/RB-0.91/wp-infocard/wp/processing.pw.php
r159 r161 59 59 -lastused 60 60 -startdate 61 -cardhash 61 62 Side Effects: none 62 63 */ … … 68 69 return 'Error! Information Card requested for a user other than the currently authenticated user.'; 69 70 70 $query = "SELECT cardhandle, lastused, startdate FROM `" . PW_TABLE_PREFIX71 $query = "SELECT cardhandle, cardhash, lastused, startdate FROM `" . PW_TABLE_PREFIX 71 72 . "infocard_identities` WHERE accountid = '" . $ID . "'"; 72 73 $output = $wpdb->get_results( $query, OBJECT ); branches/RB-0.91/wp-infocard/wp/userdata.pw.php
r160 r161 232 232 break; 233 233 default: 234 return 'MULTIPLES'; 234 /* 235 $results contains an array of objects with either a matching accountid 236 or a matching cardhash. 237 - Must check that the card hash is associated to the right account. 238 - If there are multiple cards associated, users have to update 239 their data from their profile page. 240 */ 241 foreach (array_values($results) as $x) 242 { 243 if (pw_utils::dataCompare( $x->cardhash, $cardhash, 'Card Hash')) 244 { 245 $match = TRUE; 246 } 247 } 248 249 if (!$match) 250 return 'MULTIPLECARDS'; 235 251 } 236 252
