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
9feab1f2
Commit
9feab1f2
authored
Apr 19, 2008
by
Dries Buytaert
Browse files
- Patch
#228594
by catch and flobruit: some code clean-up.
parent
1db338e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
9feab1f2
...
...
@@ -371,7 +371,9 @@ function user_validate_name($name) {
}
function
user_validate_mail
(
$mail
)
{
if
(
!
$mail
)
return
t
(
'You must enter an e-mail address.'
);
if
(
!
$mail
)
{
return
t
(
'You must enter an e-mail address.'
);
}
if
(
!
valid_email_address
(
$mail
))
{
return
t
(
'The e-mail address %mail is not valid.'
,
array
(
'%mail'
=>
$mail
));
}
...
...
@@ -891,7 +893,7 @@ function user_menu() {
'file'
=>
'user.pages.inc'
,
);
//
Admin user
pages.
//
User administration
pages.
$items
[
'admin/user'
]
=
array
(
'title'
=>
'User management'
,
'description'
=>
"Manage your site's users, groups and access to site features."
,
...
...
@@ -929,7 +931,7 @@ function user_menu() {
'file'
=>
'user.admin.inc'
,
);
//
Admin access
pages.
//
Permission administration
pages.
$items
[
'admin/user/permissions'
]
=
array
(
'title'
=>
'Permissions'
,
'description'
=>
'Determine access to features by selecting permissions for roles.'
,
...
...
@@ -1203,11 +1205,9 @@ function user_login_default_validators() {
* A FAPI validate handler. Sets an error if supplied username has been blocked.
*/
function
user_login_name_validate
(
$form
,
&
$form_state
)
{
if
(
isset
(
$form_state
[
'values'
][
'name'
]))
{
if
(
user_is_blocked
(
$form_state
[
'values'
][
'name'
]))
{
// blocked in user administration
form_set_error
(
'name'
,
t
(
'The username %name has not been activated or is blocked.'
,
array
(
'%name'
=>
$form_state
[
'values'
][
'name'
])));
}
if
(
isset
(
$form_state
[
'values'
][
'name'
])
&&
user_is_blocked
(
$form_state
[
'values'
][
'name'
]))
{
// Blocked in user administration.
form_set_error
(
'name'
,
t
(
'The username %name has not been activated or is blocked.'
,
array
(
'%name'
=>
$form_state
[
'values'
][
'name'
])));
}
}
...
...
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