diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-10-22 18:46:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-10-22 18:46:43 +0000 |
commit | 66c5b70736553b2c84eb8835e7b4c3ad7c34c8f8 (patch) | |
tree | 605fc52b5bd8fa8e2411dee975e34c2e83276595 /modules/user/user.module | |
parent | 88d6ef3a2ad99a0872b00f40e84c083b098ad21c (diff) | |
download | brdo-66c5b70736553b2c84eb8835e7b4c3ad7c34c8f8.tar.gz brdo-66c5b70736553b2c84eb8835e7b4c3ad7c34c8f8.tar.bz2 |
- Wrapped some hardcoded colors in "theme_invoke()"s; we can still create
a drupal_error() later on but I think we better get used to theme_invoke().
- Fixed translation bug. Patch by Moshe.
- Fixed PHP warning. Patch by ax.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index d2c4d1734..835b8a996 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -77,7 +77,7 @@ function user_load($array = array()) { $result = db_query("SELECT u.*, r.name AS role FROM users u LEFT JOIN role r ON u.rid = r.rid WHERE $query u.status < 3 LIMIT 1"); $user = db_fetch_object($result); - if ($data = unserialize($user->data)) { + if ($user->data && $data = unserialize($user->data)) { foreach ($data as $key => $value) { if (!isset($user->$key)) { $user->$key = $value; @@ -188,7 +188,7 @@ function user_validate_mail($mail) { */ if ($mail && !eregi("^[0-9a-z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2,})$", $mail)) { - return t("The e-mail address '$mail' is not valid."); + return t("The e-mail address '%mail' is not valid.", array("%mail" => $mail)); } } @@ -579,7 +579,7 @@ function user_login($edit = array(), $msg = "") { */ if ($error) { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -678,7 +678,7 @@ function user_pass($edit = array()) { // Display error message if necessary. if ($error) { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -800,7 +800,7 @@ function user_register($edit = array()) { } else { if ($error) { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } } @@ -917,7 +917,7 @@ function user_edit($edit = array()) { } if ($error) { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } if (!$edit) { @@ -1141,7 +1141,7 @@ function user_admin_create($edit = array()) { else { if ($error) { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } $output .= form_textfield("Username", "name", $edit["name"], 30, 55); @@ -1396,7 +1396,7 @@ function user_admin_edit($edit = array()) { $output .= status(t("your user information changes have been saved.")); } else { - $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>"; + $output .= theme_invoke("theme_error", check_output($error)); } } else if ($op == "Delete account") { |