diff options
Diffstat (limited to 'modules/user.module')
-rw-r--r-- | modules/user.module | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/user.module b/modules/user.module index d2c4d1734..835b8a996 100644 --- a/modules/user.module +++ b/modules/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") { |