Changeset 126
- Timestamp:
- 12/03/07 14:22:08 (1 year ago)
- Files:
-
- branches/RB-0.9/wp-infocard/site-messages/infocard-usermessage.php (modified) (1 diff)
- branches/RB-0.9/wp-infocard/wp-infocard.php (modified) (1 diff)
- branches/RB-0.9/wp-infocard/wp/admin.pw.php (modified) (4 diffs)
- branches/RB-0.9/wp-infocard/wp/processing.pw.php (modified) (2 diffs)
- branches/RB-0.9/wp-infocard/wp/userdata.pw.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/RB-0.9/wp-infocard/site-messages/infocard-usermessage.php
r112 r126 2 2 <?php 3 3 $messageType = $_REQUEST['mesg']; 4 4 5 5 6 include_once( dirname(__FILE__) . '/../' . '/pw-config.php'); branches/RB-0.9/wp-infocard/wp-infocard.php
r123 r126 47 47 // function to add information card link to wp-login.php 48 48 add_action( 'login_form', array( $wpInfocard, 'pw_loginform_link')); 49 add_action( 'register_form', array( $wpInfocard, 'pw_registerform_link')); 49 50 50 51 //if ( PW_USECAPTCHAS ) branches/RB-0.9/wp-infocard/wp/admin.pw.php
r122 r126 239 239 { 240 240 global $current_user; 241 if (strpos($_SERVER[SCRIPT_URI], "https")) 242 { 243 $css = PW_PLUGINURL . "/custom/infocard-frontpage.css"; 244 } 245 else 246 { 247 $css = PW_SECUREPLUGINURL . "/custom/infocard-frontpage.css"; 248 } 241 $css = get_option('siteurl') . "/custom/infocard-frontpage.css"; 249 242 250 243 $chunk = ""; 251 244 if( !$current_user->ID ) 252 245 { 253 $chunk = '<link rel="stylesheet" href="'.$css.'" type="text/css" />'; 246 //$chunk = '<link rel="stylesheet" href="'.$css.'" type="text/css" />'; 247 $chunk = ''; 254 248 // note I set the CSS styles inline because otherwise 255 249 // the user has to link infocard.css - not worth it 256 250 // for this one icon 257 $chunk .='< /li><li><a id="pw_frontpage_link"href="'251 $chunk .='<li><a href="' 258 252 . PW_SECUREPLUGINURL .'/' . PW_PLUGIN 259 253 . '/login/infocard-login.php" alt="' 260 254 . __('Information Card Login') 261 . '" ><img id="pw_frontpage_icon"src="'255 . '" style="border-bottom:none;"><img src="' 262 256 . PW_IMGURL . '/' .PW_FP_ICON 263 . '" /></a></li>';257 . '" style="border:none; border-bottom: none;"/></a></li>'; 264 258 } 265 return $link . $chunk;259 return $link . $chunk; 266 260 } //end function pw_frontpage_link 267 261 … … 283 277 } //end function pw_loginform_link 284 278 279 280 function pw_registerform_link() 281 { 282 // if ( PW_USECAPTCHAS ) 283 // display_cryptographp(); 284 ?> 285 <hr /> 286 <a href="<?php echo PW_SECUREPLUGINURL . '/' . PW_PLUGIN; ?>/login/infocard-login.php" alt="<?php pw_utils::screenPrint('Infocard Login'); ?>" style="border-bottom: none; color: #FFF"> 287 <?php pw_utils::screenPrint('Register using an Information Card'); ?> 288 <br/> 289 <img src="<?php echo PW_IMGURL; ?>/infocard_60x42.png" style="padding:10px" /> 290 </a> 291 <a alt="<?php echo __('What is this?'); ?>" style="border-bottom: none; color: #fff" href="http://pamelaproject.com/"> 292 <?php echo __('(what is this?)'); ?> 293 </a> 294 <?php 295 } //end function pw_registerform_link 296 285 297 function pw_printUserCardStatus() 286 298 { … … 295 307 ?> 296 308 <p> 297 <img src="<?php echo PW_IMGURL; ?>/ic-logo/ic-logo-blue-icon.png"/> <?php pw_utils::screenPrint('Information Card ID: ' . $handle); ?> 309 <img src="<?php echo PW_IMGURL; ?>/infocard_60x42.png"/> 310 <?php 311 pw_utils::screenPrint('An Information Card is associated with this account'); 312 //pw_utils::screenPrint('Information Card ID: ' . $handle); 313 ?> 298 314 </p> 299 315 … … 305 321 . "<label for='Information Card Info' style='display: inline'><img src=\"" 306 322 . PW_IMGURL 307 . '/i c-logo/ic-logo-disabled.png"'323 . '/infocard_60x42_disabled.png"' 308 324 . " style='vertical-align: middle'/> "; 309 pw_utils::screenPrint('No Information Card in use.');325 pw_utils::screenPrint('No Information Card associated with this account.'); 310 326 echo "</label></p>"; 311 327 } branches/RB-0.9/wp-infocard/wp/processing.pw.php
r122 r126 26 26 pw_utils::printDebug(" Login ID: ".$datamap['user_login']->new_value."<br />"); 27 27 pw_utils::printDebug(" Account ID: ".$datamap['ID']->new_value."<br />"); 28 pw_utils::printDebug(" Status: ".$status." <br/>");28 pw_utils::printDebug(" User Status: ".$status." <br/>"); 29 29 30 30 pw_utils::printDebug(" Errors: "); … … 34 34 pw_utils::printDebug(" none<br />"); 35 35 36 pw_utils::printDebug(" Trusted Source:"); 37 if ($blessed) 38 pw_utils::printDebug("Yes<br/>"); 39 else 40 pw_utils::printDebug("No<br/>"); 36 pw_utils::printDebug(" Issuer Trust: ".$blessed."<br />"); 41 37 42 38 pw_utils::printDebug(" Account Validation: "); 43 if ($validated )44 pw_utils::printDebug(" Sent<br/>");39 if ($validated === 'validate') 40 pw_utils::printDebug("Required<br/>"); 45 41 else 46 42 pw_utils::printDebug("Not needed<br/>"); branches/RB-0.9/wp-infocard/wp/userdata.pw.php
r125 r126 77 77 } 78 78 79 pw_utils::printDebug(' Card belongs to account #:' . $identity_user_id . "<br/>" );79 pw_utils::printDebug('Card Found: Acct# ' . $identity_user_id . "<br/>" ); 80 80 81 81 $query = "SELECT * from " . PW_TABLE_PREFIX . "users " … … 164 164 { 165 165 global $claimslist, $datamap; 166 pw_utils::printDebug('<br/>Mapped Token Data:<br/>' );166 pw_utils::printDebug('<br/>Mapped Token Data:<br/>', 1); 167 167 foreach(array_keys($datamap) as $key) 168 168 { 169 169 $datamap[$key]->new_value = eval($datamap[$key]->mappingfunction); 170 170 //pw_utils::printDebug(' Mapping Function: '.$datamap[$key]->mappingfunction.'<br/>'); 171 pw_utils::printDebug(' ' . $datamap[$key]->handle.' Value: '.$datamap[$key]->new_value.'<br/>' );172 } 173 pw_utils::printDebug('<br />' );171 pw_utils::printDebug(' ' . $datamap[$key]->handle.' Value: '.$datamap[$key]->new_value.'<br/>', 1); 172 } 173 pw_utils::printDebug('<br />', 1); 174 174 } // end function mapTokenData 175 175 … … 239 239 if ($loginid) 240 240 { 241 pw_utils::printDebug(' getLoginID: Login ID already exists: '.$loginid.'<br/>');241 pw_utils::printDebug('LoginID Mapping: LoginID has already been created for the user: '.$loginid.'<br/>', 2); 242 242 return $loginid; 243 243 } 244 244 $loginid = $datamap['user_email']->new_value; 245 //$loginid = 'pamtest'; 246 pw_utils::printDebug(' getLoginID: Login ID generated: '.$loginid.'<br/>'); 245 pw_utils::printDebug('LoginID Mapping: LoginID generated: '.$loginid.'<br/>', 2); 247 246 return $loginid; 248 247 } //end function getLoginID … … 268 267 function updateUserData( $ID, $datamap ) 269 268 { 270 pw_utils::printDebug(' Comparing Existing Values to Newly Mapped Values for Account # ' . $ID . ':<br />');269 pw_utils::printDebug('<br />Account Data Analysis (Acct# ' . $ID . ')<br />'); 271 270 272 271 // not sure if there is a more graceful way to do this... … … 296 295 if (wp_update_user($userdata)) 297 296 { 298 pw_utils::printDebug(' WP-User Updates Successful');297 pw_utils::printDebug('<br />WP-User Updates Successful', 2); 299 298 } 300 299 } // end function updateUserData … … 327 326 . "OR accountid = '$acct'"; 328 327 329 pw_utils::printDebug($query);330 331 328 $results = $wpdb->get_results( $query, OBJECT ); 332 pw_utils::printDebug( '<br />IdentityData: <br/>' );329 pw_utils::printDebug( '<br />Card Data Analysis: <br />' ); 333 330 334 331 switch ( count($results) ) … … 453 450 $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 454 451 $card_info['found'] = TRUE; 455 pw_utils::printDebug(' Card belongs to account #:' . $identity_info[0]->accountid . "<br/>" );452 pw_utils::printDebug('Card Found: Acct# ' . $identity_info[0]->accountid . "<br/>" ); 456 453 break; 457 454 case 0: … … 520 517 global $wpdb, $datamap; 521 518 522 pw_utils::printDebug( ' <br/>Getting Card Info from Card Hash:' . $cardhash . '<br/>');519 pw_utils::printDebug( 'Presented card identified as: ' . $cardhash . '<br/>', 1); 523 520 524 521 $query = "SELECT * FROM `" . PW_TABLE_PREFIX … … 574 571 $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 575 572 $results['found'] = TRUE; 576 pw_utils::printDebug(' Card belongs to account #: ' . $datamap['ID']->db_value . "<br/>");573 pw_utils::printDebug('-- Card belongs to account #: ' . $datamap['ID']->db_value . "<br/>", 2); 577 574 break; 578 575 case 0: … … 611 608 // 612 609 $results['found'] = TRUE; 613 pw_utils::printDebug(' User Data found & mapped, based on Account ID.<br />' );610 pw_utils::printDebug(' User Data found & mapped, based on Account ID.<br />', 1); 614 611 foreach (array_keys($datamap) as $key) 615 612 { … … 710 707 $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 711 708 $results['found'] = TRUE; 712 pw_utils::printDebug(' Card belongs to account #: ' . $accountID . "<br/>" );709 pw_utils::printDebug('Card belongs to account #: ' . $accountID . "<br/>" ); 713 710 break; 714 711 case 0:
