mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
Fixed Guest posting.
Need a Guest account within users with an id of 1 to work. Probably worth looking for a better way.
This commit is contained in:
parent
1c1b4e5f44
commit
d5401cef49
1 changed files with 4 additions and 0 deletions
|
@ -206,7 +206,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
$error = $lang['loginwarning']; //"You must be logged in to do that."
|
||||
}
|
||||
} else {
|
||||
if ($current_user['id'] == NULL) {
|
||||
$paste_owner = "1";
|
||||
}else{
|
||||
$paste_owner = $current_user ? $current_user['id'] : null;
|
||||
}
|
||||
$statement = $conn->prepare(
|
||||
"INSERT INTO pastes (title, content, visible, code, expiry, password, encrypt, user_id, created_at, ip, views, tagsys) VALUES
|
||||
(?, ?, ?, ?, ?, ?, ?, ?, NOW(), ?, 0, ?)"
|
||||
|
|
Loading…
Add table
Reference in a new issue