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
fa5aca1e
Commit
fa5aca1e
authored
Nov 28, 2003
by
Dries Buytaert
Browse files
- Fixed error messages not being shown. Patch by Matt.
parent
8f000195
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
fa5aca1e
...
...
@@ -134,6 +134,7 @@ function user_validate_name($name) {
}
function
user_validate_mail
(
$mail
)
{
if
(
!
$mail
)
return
t
(
"You must enter an e-mail address."
);
if
(
$mail
&&
!
valid_email_address
(
$mail
))
{
return
t
(
"The e-mail address '%mail' is not valid."
,
array
(
"%mail"
=>
$mail
));
}
...
...
@@ -228,7 +229,7 @@ function user_mail($mail, $subject, $message, $header) {
$mail
,
user_mail_encode
(
$subject
),
str_replace
(
"
\r
"
,
""
,
$message
),
"MIME-Version: 1.0\nContent-
t
ype: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
"MIME-Version: 1.0
\n
Content-
T
ype: text/plain; charset=UTF-8; format=flowed
\n
Content-transfer-encoding: 8Bit
\n
"
.
$header
);
}
}
...
...
@@ -778,7 +779,7 @@ function user_register($edit = array()) {
drupal_goto
(
url
(
"user/edit"
));
}
if ($edit["name"] && $edit["mail"]) {
if
(
!
(
is_null
(
$edit
[
"name"
]
)
&&
is_null
(
$edit
[
"mail"
])
))
{
if
(
$error
=
user_validate_name
(
$edit
[
"name"
]))
{
// do nothing
}
...
...
@@ -899,7 +900,7 @@ function user_edit($edit = array()) {
global
$user
;
if
(
$user
->
uid
)
{
if ($edit["name"]) {
if
(
!
(
is_null
(
$edit
[
"name"
])
&&
is_null
(
$edit
[
"mail"
])))
{
if
(
$error
=
user_validate_name
(
$edit
[
"name"
]))
{
// do nothing
}
...
...
modules/user/user.module
View file @
fa5aca1e
...
...
@@ -134,6 +134,7 @@ function user_validate_name($name) {
}
function user_validate_mail($mail) {
if (!$mail) return t("You must enter an e-mail address.");
if ($mail && !valid_email_address($mail)) {
return t("The e-mail address '%mail' is not valid.", array("%mail" => $mail));
}
...
...
@@ -228,7 +229,7 @@ function user_mail($mail, $subject, $message, $header) {
$mail,
user_mail_encode($subject),
str_replace("\r", "", $message),
"MIME-Version: 1.0\nContent-
t
ype: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
"MIME-Version: 1.0\nContent-
T
ype: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
);
}
}
...
...
@@ -778,7 +779,7 @@ function user_register($edit = array()) {
drupal_goto(url("user/edit"));
}
if ($edit["name"] && $edit["mail"]) {
if
(!(is_null
($edit["name"]
)
&&
is_null(
$edit["mail"])
))
{
if ($error = user_validate_name($edit["name"])) {
// do nothing
}
...
...
@@ -899,7 +900,7 @@ function user_edit($edit = array()) {
global $user;
if ($user->uid) {
if ($edit["name"]) {
if
(!(is_null
($edit["name"])
&& is_null($edit["mail"])))
{
if ($error = user_validate_name($edit["name"])) {
// do nothing
}
...
...
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