[1.x & 2.x] Permanent Ban `suspended_until` is set to `2038-01-01 00:00:00`
- Dominant language
- PHP
- Stars
- 6.7k
- Forks
- 883
- Avg merge
- 15h 16m
- Merged PRs (30d)
- 73
Description
### Current Behavior
When permanent ban a user, the `suspended_until` is set to `2038-01-01 00:00:00` instead of year `9999`, not sure if it is a database limitation or a bug (probably issue with 32-bit systems?)
But actually would it be better if there is another column to record user's current ban status?
e.g. `0`->`not ban`, `1`->`temporarily banned`, `2`->`permanently banned`
If not in order to differentiate between permanently banned and temporarily banned, we have rely on checking the `suspended_until` year is it set to `9999`? which feels kind of sketchy
### Steps to Reproduce
1. Just suspend a user permanently and check the date in database
### Expected Behavior
`suspended_until` date of permanently banned user should have year `9999`, but would be better if there is another column to record user's current ban status
### Screenshots
### Environment
Tested on both version
`2.0.0-rc.1` with `MySQL 10.11.6`
`1.8.16` with `MySQL 8.0.36`
`suspended_until` column using type `datetime`
### Output of `php flarum info`
```
Flarum core: 2.0.0-rc.1
PHP version: CLI: 8.3.8, Web: 8.3.8
PHP memory limit: CLI: 512M, Web: 128M
MySQL version: 10.11.6
Loaded extensions: Core, date, libxml, pcre, hash, json, SPL, session, openssl, random, Reflection, xml, cli_server, bcmath, calendar, curl, ctype, dom, standard, fileinfo, filter, ftp, gd, gettext, gmp, iconv, imap, intl, ldap, mbstring, mysqlnd, mysqli, zlib, pcntl, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, posix, readline, exif, SimpleXML, sockets, soap, sodium, sysvsem, sqlite3, tokenizer, xmlreader, xmlwriter, zip, Phar, Zend OPcache, xdebug
+------------------------------+---------------+------------------------------------------+-------+
| Flarum Extensions | | | |
+------------------------------+---------------+------------------------------------------+-------+
| ID | Version | Commit | Notes |
+------------------------------+---------------+------------------------------------------+-------+
| flarum-flags | v2.0.0-rc.1 | | |
| flarum-tags | v2.0.0-rc.1 | | |
| flarum-approval | v2.0.0-rc.1 | | |
| flarum-mentions | v2.0.0-rc.1 | | |
| flarum-subscriptions | dev-main | | |
| flarum-suspend | v2.0.0-rc.1 | | |
| fof-follow-tags | 2.0.0-beta.6 | | |
| fof-default-user-preferences | 2.0.0-beta.2 | | |
| fof-byobu | 2.0.0-beta.11 | | |
| linkrobins-support | dev-main | 712091183e10a34e6c7ce5b28fbb10135d7d15c0 | |
| ianm-follow-users | 2.0.0-beta.7 | | |
| huoxin-relative-url | 2.x-dev | 9d21286bbca19017285cdd97b466013685fa1354 | |
| fof-links | 2.0.0-beta.3 | | |
| fof-drafts | dev-main | | |
| flarum-sticky | v2.0.0-rc.1 | | |
| flarum-statistics | v2.0.0-rc.1 | | |
| flarum-messages | v2.0.0-rc.1 | | |
| flarum-markdown | v2.0.0-rc.1 | | |
| flarum-lock | v2.0.0-rc.1 | | |
| flarum-likes | v2.0.0-rc.1 | | |
| flarum-lang-english | v2.0.0-rc.1 | | |
| flarum-extension-manager | v2.0.0-rc.1 | | |
| flarum-emoji | v2.0.0-rc.1 | | |
| flarum-bbcode | v2.0.0-rc.1 | | |
+------------------------------+---------------+------------------------------------------+-------+
Base URL: https://xxxxxx
Installation path: /home/user/test/public
Queue driver: sync
Session driver: file
Scheduler status: Active
Mail driver: null
Debug mode: ON
Don't forget to turn off debug mode! It should never be turned on in a production system.
```
### Possible Solution
_No response_
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.