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
4eda8b31
Commit
4eda8b31
authored
Dec 12, 2006
by
Steven Wittens
Browse files
#101900
: Can't create blocked user
parent
cfe44ef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
4eda8b31
...
...
@@ -1226,7 +1226,12 @@ function user_register_submit($form_id, $form_values) {
//the unset below is needed to prevent these form values from being saved as user data
unset
(
$form_values
[
'form_token'
],
$form_values
[
'submit'
],
$form_values
[
'op'
],
$form_values
[
'notify'
],
$form_values
[
'form_id'
],
$form_values
[
'affiliates'
],
$form_values
[
'destination'
]);
$account
=
user_save
(
''
,
array_merge
(
$form_values
,
array
(
'pass'
=>
$pass
,
'init'
=>
$mail
,
'roles'
=>
$roles
,
'status'
=>
(
$admin
||
variable_get
(
'user_register'
,
1
)
==
1
))));
$merge_data
=
array
(
'pass'
=>
$pass
,
'init'
=>
$mail
,
'roles'
=>
$roles
);
if
(
!
$admin
)
{
// Set the user's status because it was not displayed in the form.
$merge_data
[
'status'
]
=
variable_get
(
'user_register'
,
1
)
==
1
;
}
$account
=
user_save
(
''
,
array_merge
(
$form_values
,
$merge_data
));
watchdog
(
'user'
,
t
(
'New user: %name %email.'
,
array
(
'%name'
=>
$name
,
'%email'
=>
'<'
.
$mail
.
'>'
)),
WATCHDOG_NOTICE
,
l
(
t
(
'edit'
),
'user/'
.
$account
->
uid
.
'/edit'
));
$variables
=
array
(
'!username'
=>
$name
,
'!site'
=>
variable_get
(
'site_name'
,
'Drupal'
),
'!password'
=>
$pass
,
'!uri'
=>
$base_url
,
'!uri_brief'
=>
substr
(
$base_url
,
strlen
(
'http://'
)),
'!mailto'
=>
$mail
,
'!date'
=>
format_date
(
time
()),
'!login_uri'
=>
url
(
'user'
,
NULL
,
NULL
,
TRUE
),
'!edit_uri'
=>
url
(
'user/'
.
$account
->
uid
.
'/edit'
,
NULL
,
NULL
,
TRUE
),
'!login_url'
=>
user_pass_reset_url
(
$account
));
...
...
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