Changeset 158
- Timestamp:
- 03/13/08 16:00:41 (10 months ago)
- Files:
-
- branches/RB-0.91/wp-infocard/pw-config.php (modified) (1 diff)
- branches/RB-0.91/wp-infocard/wp/login/infocard-newcard.php (modified) (5 diffs)
- branches/RB-0.91/wp-infocard/wp/login/login.pw.php (modified) (2 diffs)
- branches/RB-0.91/wp-infocard/wp/processing.pw.php (modified) (1 diff)
- branches/RB-0.91/wp-infocard/wp/utils.pw.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/RB-0.91/wp-infocard/pw-config.php
r150 r158 8 8 define ('PW_PLUGINPATH', '/wp-content/plugins/wp-infocard'); 9 9 define ('PW_VERSION', 'v0.91'); 10 define ('PW_VERSION_DATE', ' 12/27/07');10 define ('PW_VERSION_DATE', '03/09/08'); 11 11 define ('PW_DB_VERSION', 'DB v3'); 12 12 define ('PW_USECAPTCHAS', false ); branches/RB-0.91/wp-infocard/wp/login/infocard-newcard.php
r144 r158 6 6 include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/clickback.pw.php'); 7 7 include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/login/login.pw.php'); 8 9 $user = pw_utils::getUserInfo(); 8 $username = pw_utils::authenticatedUsername(); 10 9 11 10 ?> … … 36 35 <body> 37 36 <?php 38 if ( (!$user['authenticated']) || ($user['ID'] === 'error'))37 if (!$username) 39 38 pw_utils::errorPageRedirect('DENIEDCARD'); 40 39 ?> … … 46 45 pw_utils::screenPrint( pw_utils::getTitle() 47 46 . ': New Information Card for: ' 48 . $user ['name']);47 . $username ); 49 48 ?> 50 49 </h3> … … 70 69 </div> 71 70 <?php 72 if ( $user ['authenticated'])71 if ( $username ) 73 72 { 74 73 ?> … … 77 76 </div> 78 77 <div id="pw_login"> 79 <form name="ctl00" id="ctl00" method="post" action="<?php pw_login::printIC PostDestination(); ?>">78 <form name="ctl00" id="ctl00" method="post" action="<?php pw_login::printICAuthenticatedPostDestination(); ?>"> 80 79 <?php 81 80 $trigger_debug = pw_login::printIdentitySelectorTrigger(); 82 $cb_debug = pw_clickback::printHiddenClickback($clickback);81 //$cb_debug = pw_clickback::printHiddenClickback($clickback); 83 82 ?> 84 83 <button id="pw_login_submit" type="submit"><?php pw_utils::screenPrint('Login or Register Now!'); ?></button> branches/RB-0.91/wp-infocard/wp/login/login.pw.php
r102 r158 52 52 { 53 53 // could put a fancy detection for SSL here 54 55 54 print PW_SECUREPLUGINURL 56 55 . "/pwlib/processing/infocard-post.php"; … … 66 65 } 67 66 67 function printICAuthenticatedPostDestination() 68 { 69 // could put a fancy detection for SSL here 70 print PW_SECUREPLUGINURL 71 . "/pwlib/processing/infocard-authn.php"; 72 } 73 68 74 function printLoginAgainLink() 69 75 { branches/RB-0.91/wp-infocard/wp/processing.pw.php
r149 r158 101 101 return $cardhash; 102 102 } //end function getDBv1CardHash 103 103 104 /* 105 Function: getCardInfo 106 Description: get Card info for a user 107 Input: id: user id 108 Output: array of objects containing card data 109 Side-Effects: none 110 */ 111 function getCardInfo( $id ) 112 { 113 $results = array(); 114 if (!$id || is_int($id)) 115 return $results; 116 117 global $wpdb; 118 $query = "SELECT * FROM wp_infocard_identities WHERE " 119 . "accountid = '(int)$id'"; 120 121 $results = $wpdb->get_results( $query, OBJECT ); 122 return $results; 123 } // end function getCardInfo 104 124 } // end class pw_processing 105 125 ?> branches/RB-0.91/wp-infocard/wp/utils.pw.php
r144 r158 315 315 return $results; 316 316 } 317 /* 318 Function: authenticatedUsername 319 Description: returns the username if an active sesion exists 320 Input: none 321 Output: user name if an active session exists 322 empty string otherwise 323 Side-Effect: none 324 */ 325 function authenticatedUsername() 326 { 327 $user = pw_utils::getUserInfo(); 328 if ((!$user['authenticated']) || ($user['ID'] === 'error')) 329 return ''; 330 else 331 return $user['name']; 332 } 317 333 318 334 } // end class pw_utils
