Commit graph

42 commits

Author SHA1 Message Date
Partydragen
44f45019be
Rework validation (#3641)
* Beginning of new email validation page

* Allow user login during validation

* Keep user logged out during pre-validation

* Add ability to change email during validation

* Rework Change & Resend email

* Show error if validation email failed during register

* Add rate limit

* Update email failure text

Co-authored-by: tadhgboyle <tadhgsmboyle@gmail.com>

* Make sure user exists and is not active

* Fix invalid language term

* Update validate email text

* Regenerate code if code is empty

---------

Co-authored-by: tadhgboyle <tadhgsmboyle@gmail.com>
2025-05-22 22:18:40 +02:00
tadhgboyle
145c8bc1c2
Remove internal deprecations (#3630)
* Remove internal deprecations

* add convert profile posts task + remove dead lang_charset references

* guard og_image usages

* fix

* add note about mailhog

* revert group sync manager for time being

* review amendments

* fox
2025-05-04 14:08:21 -07:00
Tadhg Boyle
e2130be87a
Event system DX improvements (#3226)
Co-authored-by: Partydragen <admin@partydragen.com>
Co-authored-by: Robin Slot <robin+github@rkslot.nl>
2023-03-01 11:35:10 -08:00
Tadhg Boyle
5e07ac2d70 Create and utilize Text class, add deprecation warnings 2022-06-13 22:44:01 -06:00
Partydragen
d7a30ef317 Fix default language for webhooks 2022-06-04 13:58:49 +02:00
Tadhg Boyle
0ace37d0e9
DB migration system (#2770) 2022-05-31 11:29:47 -06:00
PadowYT2
f01f8b3dbe Resolve conversation & from #2757 2022-05-27 11:54:24 +03:00
Tadhg Boyle
2c21149a1e
Use i18n for translations (#2658)
* Dependency updates

* Start i18n conversion

* Switch to ellipsis character

* Add Dutch language json

* Remove Dutch PHP language files + fix variables

* Further variable fixes

* WIP i18n Language class conversion

* Convert Cookie Consent module to new language format

* Further progress including timeago translations

* Misc

* Replace {x}

* Replace more {x} usage

* {{time}}

this took way too long

* replace last {x}

* Remove comments

So searching for {x} produces relevant results

* forgot to save

* move to onPageLoad

* Accept both string and int

* types in doc

* Remove unused (broken?) function

* Don't convert to string first

* Last arg doesn't seem to be used anywhere

* Time `{x}` replacements

* Email `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* remove comments (makes searching for "{x}" nicer)

* misc `{x}` replacements

* JS `{x}` replacements

* Cleanup language initialization

* Change language constant + add pluralForm support

* Misc language update things

* Add script to find unused terms

* Check all quote types

* Remove most english translations from non-english languages

* Also match with more args

* Missed some apparently

* Missed some (more) apparently

* Misc work

* Add script to convert *all* language files to json

* Fix language codes

* Remove a lot of unused terms

* Remove a lot more unused terms

* Convert everything to JSON, delete old files, get installer working with new system

* Fix general configuration language dropdown + email messages

* Fix page load time, fix language term `set` method

* Fix discord integration command

* Misc

* Misc

* Uncomment RTL definition

* Misc

* Convert links

* Convert links

* Convert links

* Convert links

* Misc work (bolding, fixes, etc)

* Style fix

* Fix variable

* Fix #2668

* Fix old page load timers

* Fix installer group sync injector error

* Convert integration language terms

* Fix more integration language things

* Re-add upgrade script language things

* Resolve PR comments

* Remove unnecessary date()

* Resolve some PR issues

* Fix endpoint

* Style

* Fix Semantic -> Fomantic

* Fix Semantic -> Fomantic

* Return locale short code, not language id/name

Only the short code is interesting to the API, return short code in user info endpoint just like in the website info endpoint.

Also renamed to locale because it's language + region

* Revert "warn people to not translate old language files"

This reverts commit 690b77afff.

* Fix query when there are no filters

* Update 200-pr12.php

* Update footer.php

* insert time into string using placeholder

* Fix getDisplayname case

* Clean username

* PR suggestions

* Include newly created language in converted languages (migration)

* PR suggestions

* PR suggestions

* Update init.php

* Fix default language

Co-authored-by: samerton <samerton@users.noreply.github.com>
Co-authored-by: Robin <robinslot@hotmail.nl>
Co-authored-by: Robin <robin+git@rkslot.nl>
Co-authored-by: Partydragen <adrian_kili@outlook.com>
2022-04-23 14:27:10 +01:00
Partydragen
d2503a1ae0
User Integrations systems (#2606)
* Initial work for User Integrations systems

* Convert a few endpoints to new user integration system

* Finish minecraft part to new User Integration system

* Fixes verify banner issue https://github.com/NamelessMC/Nameless/issues/2052

Fixes https://github.com/NamelessMC/Nameless/issues/2052

* Convert discord to new user integrations system

* Update fields to show user integrations

* Add user integrations to StaffCP user page / move over

* Update UserInfo and Rename MinecraftVerify endpoint

* Rework user listing endpoint

* Password check never returns null

* Add support for offline mode uuid

* Fix documentation phpstan warnings

* else if

* remove die()

* Revamp registration page

* add integrations settings page

* Convert authme & fix phpstan issues

* refix settings page

* Load uuid when user is loaded

* Redirect user to complete required integrations

* Fix translation for user connections page

* Rework integrations registration in Register Endpoint

Completes https://github.com/NamelessMC/Nameless/issues/2516

* make getIntegration ignore case sensitive

* Update installer

* Update upgrader script to convert users

* Fix index for user integrations

* Remove uuid from user data

* Misc

* Remove one unused query

* Add event for integration linking, verify and unlink

* Finish user transformer, Finish user integrations

* Thx phpstan

* Fix phpdocs

* Fix user reports page

* Remove validation banner

* Change default field value

* resolve samerton feedback

* don't clean when inserting data

* don't clean event data

* remove more clean

* increase reset_code length from 60 to 64

* pr13 confirmed

* one more clean

* Remove API verification setting

* Register integrations edit permission

* Resolve a few requested changes

* Rework username and identifier validation

* Add button to sync user integration

* Fix Synchronisation text

* Fix is verified term

Co-authored-by: Robin <robinslot@hotmail.nl>
Co-authored-by: Robin <robin+git@rkslot.nl>
2022-04-16 17:42:24 +01:00
Tadhg Boyle
ee4ea4f67d Remove redundant die() statements after Redirect::to calls 2022-03-07 22:28:39 -08:00
Tadhg Boyle
68134fcbab Misc 2021-12-28 02:54:20 -07:00
Tadhg
e0133a5cd5 Get PHP-CS to pass! 2021-12-07 22:14:12 -08:00
Tadhg
1566c86067 Fix some CS issues 2021-12-07 20:51:29 -08:00
Tadhg
67284be228 Extract common if statement code 2021-11-04 09:34:50 -07:00
Tadhg
b1a65c07e5 Fix if statements with common parts 2021-11-04 08:34:53 -07:00
Tadhg
65b00b9486 replace define() with const where applicable 2021-11-02 21:28:04 -07:00
Tadhg
a9c678e4d4 convert all array(...) syntax to [...] 2021-10-29 22:00:05 -07:00
Tadhg Boyle
6479a3ce7f
Change naming of HookHandler class properties and methods (#2458) 2021-10-25 19:57:43 -07:00
Tadhg
1d8779a063 fix typo 2021-10-19 16:56:12 -07:00
Tadhg
c7a8f2c0e5 add required $template variable to Module::loadPage 2021-10-19 16:51:29 -07:00
Robin
36d4994312 rename $mod_nav to $staffcp_nav, move groups to be near users
because groups are closely related to users
2021-10-08 21:13:33 +02:00
Tadhg Boyle
c25802bad1
Add new dynamic Group Sync injectors system + separate Discord into own module (#2423)
Co-authored-by: Robin <robinslot@hotmail.nl>
2021-10-05 15:13:04 -07:00
Tadhg
ccd09e8a64 potential solutino for #2067 2021-05-15 16:48:05 -07:00
Tadhg
6694a6a7ca initial commit (untested) 2021-04-06 15:51:07 -07:00
Partydragen
b08fa47376 Fix more PHP 8 compatibility 2021-02-27 12:52:14 +01:00
samerton
2ec7b0a413 Fix validate hook after API signup completion 2021-01-04 21:05:43 +00:00
samerton
a6cbac1771 Fix validate user hook content 2020-12-28 10:08:36 +00:00
Tadhg
4c58e0a0f6 fix old bot things 2020-12-24 08:24:12 -08:00
Tadhg
792e79150d remove refs to "getTopGroup()" 2020-12-23 22:34:57 -08:00
partydragen
b82e571d19 Latest 2020-10-27 17:04:04 +01:00
Tadhg Boyle
f93ac78041
Major API Changes (#1836)
* continue updating api

* Add Ingame Group Name dropdown if groups were sent by plugin

* add validation function for params, add docblocks

* revert call_user_func

* wip

* Modular API endpoints! WIP

* Modular endpoints wip

* fix some errors, get discord linking working again

* Add panel page for API Endpoints

* revert lastid rename

* Add Endpoint descriptions

* clean up some endpoints

* wip

* WIP (booleans, intval, mc integration work)

* wip

* discord secondary groups - WIP

* Fix some group sync form things

* add writable info to Server Compatibility. other fixes WIP

* redo group sync page logic

* fix some validation logic

* Add group order to group list

* Endpoint autoloader

* dont need that variable

* Add listUsers filters

* Rework #1839

* Move banned/active filters to query

* rename 'active' to 'verified'

* Use boolval function

* Use double negation instead of boolval

* use bool cast

* WIP syncing Secondary Groups

* wip Discord Role Syncing

* accidental html

* wrong order

* wip clean endpoints

* Test/Fix all endpoints

We are getting close to completion :confetti_balls:

* Add missing translations

* new class for Discord functions

* Add check if hooks exists on upgrade

* add missing admin permissions on install

* add discord role in setGroup endpoint

* #1876 - Add user language to userInfo endpoint

* Store report dates using unix timestamp

* Get language name via join in userInfo endpoint

* Add default language to info endpoint

* Uninstall instructions

* Fix user logic for real

* simpify discordBotRequest return value

Co-authored-by: samerton <samerton@users.noreply.github.com>
Co-authored-by: Derkades <robinslot@hotmail.nl>
2020-10-25 13:59:02 -07:00
Tadhg
d55e6e076a add option for backup bot url & use it if the first fails 2020-07-29 12:16:12 -07:00
Tadhg
fe4ed70915 Fix some 5.2 issues, use cURL rather than get_file_contents 2020-07-28 01:52:16 -07:00
Tadhg Boyle
0560fd907b
Discord Integration! Sync your roles between your NamelessMC site and your Discord Guild. (#1764)
* Initial commit, big additions. Linking/verifying discord id is complete

* Update admin.php

* Better validation errors + language updating

* Apply role change on user edit page - still some things to flush out though

* flush out some edge cases

* Add role in discord upon account validation & more

* Add api endpoint (need to test) & a lot of TODOs

* fix announcements a bit on Default template

* define bot url for easier move to self-hosting

* Add discord->website (adding) sync & lots of the TODOs

* Add discord role removal api endpoint

* Add logging od discord role add/remove & fix log table

* Add api_url to discord request for extra security & add todo's for error handling

* More API error handling for discord bot

* Add boilerplate error handling if bot throws error

* Add error messages for all discord linking

* If they have a role on the site, give it to them when they verify their id

* Resolve Sam's review

* Add info msgs so people know where to get discord IDs

* Add all language translations and update NMC version strings
2020-07-25 21:00:41 -07:00
Tadhg Boyle
ef016942c6
Fix wrong type of alert on validation error
Success! Your account failed to validate.
2020-06-27 15:31:55 -07:00
samerton
c46dedc08c Fix users not being promoted after validating 2018-11-19 20:45:16 +00:00
samerton
ccbbb128b9 Add parameter list to events 2018-08-29 13:48:28 +01:00
samerton
a6208dfe3d Remove built-in forum online user list 2018-05-29 16:39:39 +01:00
Sam
edd275c462 Start alternative method of account validation through API 2018-03-23 14:02:21 +00:00
Sam
d0389275b9 Add AuthMe integration and Minecraft service status 2017-04-16 15:58:05 +01:00
Sam
9563651a28 Update validation redirect URL
Update validation redirect URL to use URL builder function
2016-12-07 21:07:38 +00:00
Sam
c2e5a1cd80 Initial file upload
Initial v2 pre-release file upload, not yet ready for use
2016-11-29 22:27:19 +00:00