diff --git a/account.php b/account.php index bfc9ffd7c91..4041c62f103 100644 --- a/account.php +++ b/account.php @@ -176,7 +176,7 @@ function account_user($uname) { $output .= "\n"; $output .= " \n"; $output .= " \n"; - $output .= " \n"; + $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; @@ -190,7 +190,7 @@ function account_user($uname) { elseif ($uname && $account = account_get_user($uname)) { $box1 .= "
User ID:$user->userid
Name:". format_data($user->name) ."
E-mail:". format_email_address($user->fake_email) ."
E-mail:". format_email($user->fake_email) ."
URL:". format_url($user->url) ."
Bio:". format_data($user->bio) ."
Signature:". format_data($user->signature) ."
\n"; $box1 .= " \n"; - $box1 .= " \n"; + $box1 .= " \n"; $box1 .= " \n"; $box1 .= " \n"; $box1 .= "
Username:$account->userid
E-mail:". format_email_address($account->fake_email) ."
E-mail:". format_email($account->fake_email) ."
URL:". format_url($account->url) ."
Bio:". format_data($account->bio) ."
\n"; @@ -288,9 +288,9 @@ function account_register_submit($new) { user_save($new); $link = "http://". getenv("HOSTNAME") ."/account.php?op=confirm&name=$new[userid]&hash=$new[hash]"; - $message = "$new[userid],\n\n\nsomeone signed up for a user account on $sitename and supplied this email address as their contact. If it wasn't you, don't get your panties in a knot and simply ignore this mail.\n\nIf this was you, you have to activate your account first before you can login. You can activate your account by visiting the URL below:\n\n $link\n\nVisiting this URL will automatically activate your account. Once activated you can login using the following information:\n\n username: $new[userid]\n password: $new[passwd]\n\n\n-- $sitename crew\n"; - // mail($new[real_email], "Account details for $sitename", $message, "From: noreply@$sitename"); - print "
$message
\n"; + $message = "$new[userid],\n\n\nsomeone signed up for a user account on $sitename and supplied this email address as their contact. If it wasn't you, don't get your panties in a knot and simply ignore this mail.\n\nIf this was you, you have to activate your account first before you can login. You can do so simply by visiting the URL below:\n\n $link\n\nVisiting this URL will automatically activate your account. Once activated you can login using the following information:\n\n username: $new[userid]\n password: $new[passwd]\n\n\n-- $sitename crew\n"; + + mail($new[real_email], "Account details for $sitename", $message, "From: noreply@$sitename"); watchdog(1, "new user `$new[userid]' <$new[real_email]>"); diff --git a/admin.php b/admin.php index 05737b1c6e4..5f38df1d32f 100644 --- a/admin.php +++ b/admin.php @@ -40,7 +40,7 @@ function account_display($order = "username") { foreach ($show as $key=>$value) { switch($value) { case "real_email": - $output .= " ". format_email_address($account[$value]) ."\n"; + $output .= " ". format_email($account[$value]) ."\n"; break; case "last_access": $output .= " ". format_date($account[$value]) ."\n"; @@ -91,7 +91,7 @@ function account_view($name) { $output .= " ID:$account->id\n"; $output .= " Username:$account->userid\n"; $output .= " Real name:". format_data($account->name) ."\n"; - $output .= " Real e-mail address:". format_email_address($account->real_email) ."\n"; + $output .= " Real e-mail address:". format_email($account->real_email) ."\n"; $output .= " Fake e-mail address:". format_data($account->fake_email) ."\n"; $output .= " URL of homepage:". format_url($account->url) ."\n"; $output .= " Last access:". format_date($account->last_access) ." from $account->last_host\n"; diff --git a/discussion.php b/discussion.php index a6097b4d811..18238a49f58 100644 --- a/discussion.php +++ b/discussion.php @@ -287,7 +287,7 @@ function comment_post($pid, $sid, $subject, $comment) { $subject = ($subject) ? $subject : substr($comment, 0, 29); ### Add comment to database: - db_insert("INSERT INTO comments (pid, sid, author, subject, comment, hostname, timestamp) VALUES ($pid, $sid, $user->id, '". addslashes($subject) ."', '". addslashes($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."')"); + db_insert("INSERT INTO comments (pid, sid, author, subject, comment, hostname, timestamp) VALUES ($pid, $sid, '$user->id', '". addslashes($subject) ."', '". addslashes($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."')"); ### Compose header: header("Location: discussion.php?id=$sid"); diff --git a/includes/function.inc b/includes/function.inc index 5c1a3615a68..ec3ad0a90ff 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -1,8 +1,5 @@ $address" : format_data($address); } diff --git a/includes/template.inc b/includes/template.inc index 5cb6c84d1db..0190d4293e3 100644 --- a/includes/template.inc +++ b/includes/template.inc @@ -1,5 +1,4 @@ article) ? "[ id\">hlcolor2\">read more | ". strlen($story->article) ." bytes | id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]" : "[ id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]"; @@ -61,7 +60,7 @@ function display_old_headlines($theme, $num = 10) { function display_comment_moderation($id, $author, $score, $votes) { global $user, $comment_votes; - if ($user->userid && $user->userid != $author && !user_getHistory($user->history, "c$id")) { + if ($user->id && $user->userid != $author && !user_getHistory($user->history, "c$id")) { $output .= "\n"; @@ -106,7 +105,8 @@ function display_calendar($theme, $date) { function display_account($theme) { global $user; - if ($user && $user->userid) { + if ($user->id) { + function submission_number() { $result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1"); return ($result) ? db_result($result, 0) : 0; diff --git a/includes/theme.inc b/includes/theme.inc index 93c6b62ffe5..0251f3d8162 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1,8 +1,11 @@