[wp-cvs] wordpress/wp-includes functions.php,1.136,1.137
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sat Aug 7 01:22:19 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22311/wp-includes
Modified Files:
functions.php
Log Message:
Define COOKIEHASH and new get_profile function. TODO: re-org function soup
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.136
retrieving revision 1.137
diff -C2 -d -r1.136 -r1.137
*** functions.php 29 Jul 2004 03:34:08 -0000 1.136
--- functions.php 7 Aug 2004 01:22:17 -0000 1.137
***************
*** 13,16 ****
--- 13,23 ----
}
+ function get_profile($field, $user = false) {
+ global $wpdb;
+ if (!$user)
+ $user = $wpdb->escape($_COOKIE['wordpressuser_' . COOKIEHASH]);
+ return $wpdb->get_var("SELECT $field FROM $wpdb->users WHERE user_login = '$user'");
+ }
+
function mysql2date($dateformatstring, $mysqlstring, $use_b2configmonthsdays = 1) {
global $month, $weekday;
***************
*** 166,169 ****
--- 173,177 ----
function get_userdata($userid) {
global $wpdb, $cache_userdata;
+ $userid = (int) $userid;
if ( empty($cache_userdata[$userid]) ) {
$cache_userdata[$userid] =
More information about the cvs
mailing list