惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
WordPress大学
WordPress大学
罗磊的独立博客
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
S
SegmentFault 最新的问题
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
D
DataBreaches.Net
雷峰网
雷峰网
GbyAI
GbyAI
宝玉的分享
宝玉的分享

博客园 - jerry data

(转)三维管线自动建模工具PipelineCreator 招聘技巧一二 (转) python抓网页中文乱码问题 - jerry data - 博客园 星 ---- 谷村新司 (转载)arcgis flex api 访问 google 地图 arcgis flex api 访问 google 地图 iframe and margin - jerry data Difference method for Parse XML with C# PInvoke .NET ~ C++ how to call the member function?( C++ ) . or -> "con" function usage tip!! 转载 : flex3 中 Legend fontSize不起作用的bug解决 map service query result maxrecordcount Block development arcmap field calculator Michael F. Goodchild Talks about the Role of Volunteered Geographic Information in a Postmodern GIS World 唐骏十年管理经验谈:管理者要学会让员工感动 mysql - tutorial 1 theme elements in the form - jerry data
create user with custom profile
jerry data · 2009-12-07 · via 博客园 - jerry data

1,创建表handy_profile


create table handy_profile
(
id int not null auto_increment primary key,
gender varchar(10),
email varchar(100),
contact varchar(100),
age int,
eventid varchar(50),
message varchar(500),
imageurl varchar(100),
lat double,
lng double,
birthday date,
createdate datetime) DEFAULT CHARSET=utf8;

2, user_register_submit() //表单的提交事件调用了user_save()来创建或更新用户。
3, user_save() in the user module

创建用户的同时,触发hook_user,让其他module可以处理用户事件。
user_module_invoke('insert', $array, $user, $category);//会调用hook_user,并且传入insert作为$type参数。

4,


/*
$edit['personalinfo']
$edit['profile_gender']
*/
function hook_user($type, &$edit, &$user, $category = NULL) {
switch($type)
{
case "insert":
save_customprofile($edit,$user,$categorty,TRUE);
break;
}
}

function profile_save_profile(&$edit, &$user, $category, $register = FALSE) {

db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')"

}