Changeset 66
- Timestamp:
- 06/12/07 11:28:00 (2 years ago)
- Files:
-
- trunk/wp-infocard/custom/customdata.pw.php (added)
- trunk/wp-infocard/pw-config.php (modified) (1 diff)
- trunk/wp-infocard/pwlib/login/login.pwlib.php (modified) (3 diffs)
- trunk/wp-infocard/wp/customdata.pw.php (added)
- trunk/wp-infocard/wp/pw-claimtypes.php (modified) (2 diffs)
- trunk/wp-infocard/wp/userdata.pw.php (modified) (5 diffs)
- trunk/wp-infocard/wp/utils.pw.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-infocard/pw-config.php
r63 r66 12 12 define ('PW_VERSION_DATE', '17May07'); 13 13 define ('PW_SELECTORTRIGGER', 'html'); 14 //define ('PW_CUSTOMDATAPATH', dirname(__FILE__) . '/' . PW_PLUGIN. '/customdata.pw.php'); 15 define ('PW_CUSTOMDATAPATH', dirname(__FILE__) . '/custom/customdata.pw.php'); 16 17 include_once( PW_CUSTOMDATAPATH ); 14 18 15 19 include_once( dirname(__FILE__) . '/' . PW_PLUGIN. '/pw-claimtypes.php'); trunk/wp-infocard/pwlib/login/login.pwlib.php
r64 r66 1 1 <?php 2 //defined( '_VALID_IC' ) or die( 'Direct Access to this location is not allowed.');2 //defined( '_VALID_IC' ) or die( 'Direct Access to this location is not allowed.'); 3 3 4 4 class pwlib_login … … 189 189 foreach ($claimslist as $claim) 190 190 { 191 $newclaim = ""; 191 192 if ($output) 193 // append a space if this isn't the first claim 192 194 $output .= " "; 193 195 … … 199 201 . ($claim->required?"false":"true") 200 202 . '" />'; 203 201 204 if ( $prettyprint ) 202 205 { trunk/wp-infocard/wp/pw-claimtypes.php
r64 r66 36 36 FALSE, 37 37 'Web Page'); 38 39 // Add any custom claims 40 // (note - custom claims come from PW_CUSTOMDATAPATH in pw-config.php) 41 pw_customdata::addCustomClaims(); 38 42 39 43 $datamap['display_name'] = new pw_mapping( … … 88 92 PW_TABLE_PREFIX . 'users', 89 93 'return $' . 'claimslist[\'webpage\']->token_value;'); 94 95 // Map any custom claims 96 // (note - custom claims come from PW_CUSTOMDATAPATH in pw-config.php) 97 pw_customdata::addCustomDataMap (); 90 98 ?> trunk/wp-infocard/wp/userdata.pw.php
r60 r66 110 110 if (array_key_exists($datamap[$key]->mappingattribute, $user_info[0])) 111 111 { 112 pw_utils::printDebug(' Mapping: found '.$datamap[$key]->mappingattribute.' in user_info[0]<br/>');112 pw_utils::printDebug('Existing Value: found '.$datamap[$key]->mappingattribute.' in user_info[0]<br/>'); 113 113 $datamap[$key]->add_db_value($user_info[0][$datamap[$key]->mappingattribute]); 114 114 } … … 117 117 // special case for first, last name 118 118 $first = get_usermeta($mail_user_id, 'first_name'); 119 pw_utils::printDebug('FIRST: ' . $first . '<br/>'); 120 $datamap['first_name']->add_db_value(get_usermeta($mail_user_id, 'first_name')); 121 $datamap['last_name']->add_db_value(get_usermeta($mail_user_id, 'last_name')); 119 if ($first) 120 { 121 pw_utils::printDebug('Existing Value: found '.$datamap['first_name']->mappingattribute.' in usermeta ( '.$first.' )<br/>'); 122 $datamap['first_name']->add_db_value( $first ); 123 } 124 125 $last = get_usermeta($mail_user_id, 'last_name'); 126 if ($last) 127 { 128 pw_utils::printDebug('Existing Value: found '.$datamap['last_name']->mappingattribute.' in usermeta ( '.$last.' )<br/>'); 129 $datamap['last_name']->add_db_value( $last ); 130 } 131 pw_customdata::evaluateIncomingCustomData( $mail_user_id ); 122 132 break; 123 133 … … 157 167 $datamap[$key]->new_value = eval($datamap[$key]->mappingfunction); 158 168 //pw_utils::printDebug(' Mapping Function: '.$datamap[$key]->mappingfunction.'<br/>'); 159 pw_utils::printDebug(' N ame: '.$datamap[$key]->handle.' Value: '.$datamap[$key]->new_value.'<br/>');160 } 161 169 pw_utils::printDebug(' Newly Mapped Value: '.$datamap[$key]->handle.' Value: '.$datamap[$key]->new_value.'<br/>'); 170 } 171 pw_utils::printDebug('<br />'); 162 172 } // end function mapTokenData 163 173 … … 228 238 function updateUserData( $ID, $datamap ) 229 239 { 230 global $wpdb; 240 pw_utils::printDebug('Comparing Existing Values to Newly Mapped Values:<br />'); 241 //global $wpdb; 231 242 232 243 // not sure if there is a more graceful way to do this... … … 251 262 $userdata = compact('ID', 'user_login', 'user_email', 'user_nicename', 'user_url', 'display_name', 'first_name', 'last_name'); 252 263 264 pw_customdata::updateNewCustomData( $ID ); 265 253 266 if (wp_update_user($userdata)) 254 267 { 255 pw_utils::printDebug(' User Updates Successful');268 pw_utils::printDebug(' WP-User Updates Successful'); 256 269 pw_utils::printDebug($query); 257 270 } trunk/wp-infocard/wp/utils.pw.php
r57 r66 173 173 foreach ($claimslist as $claim) 174 174 { 175 pw_utils::printDebug( ' ' . $claim->displayname . (($claim->required)?' (required)':' (optional)') . '<br/>'); 176 //pw_utils::printDebug($claim->displayname); 175 if ($claim->schemaURI) 176 { 177 pw_utils::printDebug( ' ' . $claim->displayname . (($claim->required)?' (required)':' (optional)') . '<br/>'); 178 //pw_utils::printDebug($claim->displayname); 179 } 177 180 } 178 181 pw_utils::printDebug('<br/>');
