Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
212a0381
Commit
212a0381
authored
Dec 13, 2006
by
Steven Wittens
Browse files
#102871
: Fix profile.module fields that appear on registration page
parent
27ae6d27
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/profile/profile.module
View file @
212a0381
...
...
@@ -170,7 +170,7 @@ function profile_user($type, &$edit, &$user, $category = NULL) {
case
'load'
:
return
profile_load_profile
(
$user
);
case
'register'
:
return
profile_form_profile
(
$edit
,
$user
,
$category
);
return
profile_form_profile
(
$edit
,
$user
,
$category
,
TRUE
);
case
'update'
:
case
'insert'
:
return
profile_save_profile
(
$edit
,
$user
,
$category
);
...
...
@@ -624,8 +624,8 @@ function _profile_form_explanation($field) {
return
$output
;
}
function
profile_form_profile
(
$edit
,
$user
,
$category
)
{
$result
=
_profile_get_fields
(
$category
);
function
profile_form_profile
(
$edit
,
$user
,
$category
,
$register
=
FALSE
)
{
$result
=
_profile_get_fields
(
$category
,
$register
);
$w
=
0
;
while
(
$field
=
db_fetch_object
(
$result
))
{
$category
=
$field
->
category
;
...
...
@@ -801,11 +801,11 @@ function _profile_field_serialize($type = NULL) {
return
$type
==
'date'
;
}
function
_profile_get_fields
(
$category
)
{
function
_profile_get_fields
(
$category
,
$register
=
FALSE
)
{
$args
=
array
();
$sql
=
'SELECT * FROM {profile_fields} WHERE '
;
$filters
=
array
();
if
(
(
arg
(
0
)
==
'user'
&&
arg
(
1
)
==
'register'
)
||
(
arg
(
0
)
==
'admin'
&&
arg
(
1
)
==
'user'
&&
arg
(
2
)
==
'create'
)
)
{
if
(
$register
)
{
$filters
[]
=
'register = 1'
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment