1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-12 20:02:08 +02:00

[ticket/11769] Allow '0' as username

PHPBB3-11769
This commit is contained in:
Joas Schilling 2013-09-02 01:11:40 +02:00
parent 2ce83fce1e
commit 42b9c3c479

View File

@ -2607,7 +2607,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// If a username was supplied or the poster is a guest, we will use the supplied username.
// Doing it this way we can use "...post by guest-username..." in notifications when
// "guest-username" is supplied or ommit the username if it is not.
$username = ($username || !$user->data['is_registered']) ? $username : $user->data['username'];
$username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username'];
user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username);
}