summaryrefslogtreecommitdiff
path: root/includes
AgeCommit message (Collapse)AuthorFilesLines
2026-06-06users: revert installer login changes to validate.php and getSiteCookieNameLester Caine1-12/+1
Revert validate.php installer redirect and getSiteCookieName cookie-reuse fallback. Both caused more problems than they solved. Original behaviour restored; upgrade-time access via gOverrideLoginFunction works fine. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06users: fix session name split when site_title not yet in kernel_configLester Caine1-1/+12
getSiteCookieName() fell back to 'bit-user-bitweaver' whenever kernel_config hadn't loaded site_title (e.g. during installer/upgrade flow). This created a second cookie alongside the real 'bit-user-<site>' cookie, causing every cross-page redirect to land in a different session and lose loginfrom, admin status, and installer step state. Fix: if site_title is empty, reuse any existing bit-user-* cookie already present in the request rather than generating a new 'bitweaver' name. Also: after successful admin login, redirect to the installer directly when a version upgrade is pending (bypasses the broken loginfrom-via-session path for the INSTALLER_FORCE case). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Add CSS flag dropdown select with lipis flag-iconsLester Caine1-0/+11
- css/flag-icons.css: lipis 4x3 set, 1x1 stripped, paths → ../icons/flags/ - countries_inc.php: asort, Smarty assigns, loadCss (PKG_PATH not PKG_URL); PHP files reduce to single require() - flag_select_inc.tpl: custom dropdown with .fi CSS flags, search filter, jQuery open/close; fsName/fsValue/fsId/fsSize; min-width 300px; line-height:1.5em on flag spans - html_head_inc.tpl placeholder; display templates keep {biticon istyle=flag} Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Tidy countries list: add 5 entries, fix KOR, map 8 previously flaglessLester Caine1-2/+22
New entries: Bonaire/BES, Jersey/JEY, Kosovo/XKX, Saint Martin/MAF, Sint Maarten/SXM — all have lipis flags available. Fix: KOR was mapped to 'ko' (wrong); corrected to 'kr'. Added iso3166 mappings for BLM/bl, CUW/cw, SSD/ss which were in $bwCountries but had no flag. Only SEA/AZR/FLD remain flagless. Added note on unmapped lipis SVGs (regional, organisational, territories). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Switch to lipis flag-icons 4x3 SVG set; update constituent country codesLester Caine1-4/+4
- Replace Marble SVGs with lipis/flag-icons 4x3 set (271 flags, consistent 4:3 ratio, CC0 licensed) - Update iso3166 map: ENG/SCT/WLS/NIR now point to gb-eng/gb-sct/gb-wls/gb-nir matching lipis naming; custom eng/sct/wls/nir SVGs retained alongside - Switch flag {biticon} calls from hardcoded width/height to istyle=flag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Fix countries_inc.php scope in RoleUser::load() — require not require_onceLester Caine1-1/+1
Same issue as preferences/register: require_once inside a method is globally tracked, so a second user object load won't re-execute the file, leaving $bwIso3166 undefined and flag unset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Replace GIF flag scan with static ISO alpha-3 country list and SVG flagsLester Caine2-3/+513
- Add countries_inc.php: 252 countries as alpha-3 → name + alpha-3 → alpha-2 map for flag image lookup; derived from webtrees CountryService, no runtime webtrees dependency - Add 243 Marble SVG flags (xx.svg) plus eng/sct/wls/nir for constituent countries - Remove 244 full-name GIF flags - RoleUser: set users_country_code (alpha-3), flag (alpha-2 lowercase), and users_country (display name) at load time - preferences.php, register.php, hauth_register.php: replace opendir GIF scan with require_once countries_inc.php - Templates: replace {section loop=$flags} with {foreach $countries as $code => $name}; iexplain now uses display name instead of raw flag code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30Fix invalid cookie domain when remember-me is activeLester Caine1-1/+1
parse_url(BIT_ROOT_URL, PHP_URL_HOST) returns null for a path-only URL; the ?? '/' fallback set domain to '/' which browsers reject as invalid. Use ?? '' so the domain attribute is omitted and the browser infers the current host. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18Ensure permissions array is populated when checking admin permission. May ↵Lester Caine1-0/+3
not be set during install process
2026-05-16Pass users registered roles to session for use in protecting access using ↵Lester Caine1-3/+2
nginx auth
2026-05-16Correct logic around getRoles to correctly return just the roles a user is ↵Lester Caine1-2/+2
assigned to.
2026-05-16Tidy loadPermissions to ignore anonymous blockLester Caine1-1/+11
2026-05-15Remove unused group model codeLester Caine2-29/+4
2026-05-15To simplyfy maintenence BitUser classes have been retired and active code ↵Lester Caine7-3940/+10
base defaulted to ROLE_MODEL
2026-05-14php-cs-fixer tidies to php8.5 standardsLester Caine24-1081/+1057
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10php8.5 tidies and drop Hash from getUserIdFromCookie as it only allows a ↵Lester Caine3-14/+14
cookie string
2026-05-08Check values exist before using, and add tk token manually as the smarty ↵V5-php84lsces1-1/+1
added on is not currently working
2026-04-19Picking off Roles niggles and a few PHP8.4 tidies.lsces1-6/+6
2026-04-19BitUser still needs more work for PHP8.4 functionalitylsces1-2/+2
2026-04-19Namesspace tidies for general authentication functionslsces2-1/+2
2026-04-16Extend session information to allow extra security when accessing private ↵lsces1-0/+5
content. Use nginx auth_request to secure storage area from unmanaged use.
2026-04-16PHP8.4 style tweakslsces2-18/+12
2026-04-06Restored the ROLE_MODEL switch, but thinking it's about time I combined the ↵lsces1-10/+25
two models with one set of code using 'Team' and $gTeam to select group or role display. Should be able to return to one code base.
2026-04-06Ensure only the one session cookie is created and anonymous user always ↵lsces1-4/+4
needs creating when no user linked to session.
2026-04-06Hard coded defaults for php8.4lsces1-1/+1
2026-04-06recaptcha not working in smarty5 currently need to address at some point.lsces1-3/+3
2026-04-06Hard coded for Role model but needs work to co-exist with Group modellsces1-7/+11
2026-04-06BitUser side needs more work to align with php8.4 stylelsces1-2/+3
2026-04-05More little tweaks for now required defaults. registration_ip data has ↵lsces1-2/+4
appeared from upstream, and as it is useful I'm adding it manually but need an update script for the live sites.
2026-04-05Some tweaks to bring RoleUser in line with BitUser ... It may be more ↵lsces2-7/+9
practical going forward to split this into two packages but there is a lot of common stuff.
2026-03-27Still need to sort edge cases in users and switch between group and role modeslsces2-8/+25
2026-03-27KernelTools usagelsces1-3/+5
2026-02-01Spelling correction more major work needed on users thoughlsces1-1/+1
2025-09-05Populate user_content_count in user data as can't run it from the Smarty ↵lsces1-0/+1
template.
2025-09-04Disable Content-Security-Policy header for time being, this is working on my ↵lsces1-1/+1
live sites.
2025-08-29auth selection options need a lot more work, only the one I'm using has been ↵lsces1-0/+111
tested
2025-08-29ReCaptcha updated to PHP8.4 and namespacelsces2-8/+8
2025-08-29Extra code updated to PHP8.4 and namespacelsces7-83/+114
2025-08-29Classes updated to PHP8.4 and namespacelsces6-1374/+1456
2025-05-14Remove ROLE_MODEL codespiderr2-2/+2
2025-05-13PHP8 fixes: curly params; use ::verifyIdParameter(); default ↵spiderr2-5/+5
site_session_lifetime value
2025-04-06Clean up Cloudflare Turnstile, now workingspiderr2-25/+22
2025-04-05remove Solve Media smcaptcha (not defunct) and implement Cloudflare ↵spiderr2-3/+76
Turnstile groundwork
2025-01-18update recaptcha to 1.3.0spiderr5-19/+25
2024-09-26rename antiquated bit- css classes and cookie to bw-spiderr1-2/+2
2024-07-06FIX registration_ip for importUserspiderr1-0/+2
2022-07-31migrate from font-awesome 3.2.1 icon- to 6.1.2 fa-spiderr1-13/+13
2022-06-14remove unused logic in getDisplayNameFromHashspiderr1-14/+2
2022-06-01add users_users.registration_ipspiderr1-0/+2
2022-01-10add Orders link to user list if commerce is installedspiderr1-1/+1