{"id":17148651,"url":"https://github.com/lcharette/uf_userprofile","last_synced_at":"2025-06-28T18:36:26.875Z","repository":{"id":54178339,"uuid":"83981830","full_name":"lcharette/UF_UserProfile","owner":"lcharette","description":"Custom user and group profile fields for UserFrosting","archived":false,"fork":false,"pushed_at":"2021-03-05T01:31:48.000Z","size":282,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T11:48:43.609Z","etag":null,"topics":["userfrosting","userfrosting-sprinkle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lcharette.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"lcharette","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-03-05T15:45:48.000Z","updated_at":"2023-09-27T11:10:25.000Z","dependencies_parsed_at":"2022-08-13T08:30:41.499Z","dependency_job_id":null,"html_url":"https://github.com/lcharette/UF_UserProfile","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/lcharette/UF_UserProfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcharette%2FUF_UserProfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcharette%2FUF_UserProfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcharette%2FUF_UserProfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcharette%2FUF_UserProfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcharette","download_url":"https://codeload.github.com/lcharette/UF_UserProfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcharette%2FUF_UserProfile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262477532,"owners_count":23317504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["userfrosting","userfrosting-sprinkle"],"created_at":"2024-10-14T21:29:25.383Z","updated_at":"2025-06-28T18:36:26.860Z","avatar_url":"https://github.com/lcharette.png","language":"PHP","funding_links":["https://ko-fi.com/lcharette","https://ko-fi.com/A7052ICP"],"categories":[],"sub_categories":[],"readme":"# Custom User Profile Field Sprinkle for [UserFrosting 4](https://www.userfrosting.com)\n\n[![Donate][kofi-badge]][kofi]\n[![Latest Version][releases-badge]][releases]\n[![UserFrosting Version][uf-version]][uf]\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)\n[![Build][build-badge]][build]\n[![Codecov][codecov-badge]][codecov]\n[![StyleCI][styleci-badge]][styleci]\n\n[kofi]: https://ko-fi.com/A7052ICP\n[kofi-badge]: https://img.shields.io/badge/Donate-Buy%20Me%20a%20Coffee-blue.svg\n[releases]: https://github.com/lcharette/UF_UserProfile/releases\n[releases-badge]: https://img.shields.io/github/release/lcharette/UF_UserProfile.svg\n[uf-version]: https://img.shields.io/badge/UserFrosting-\u003e=%204.3-brightgreen.svg\n[uf]: https://github.com/userfrosting/UserFrosting\n[build]: https://github.com/lcharette/UF_UserProfile/actions?query=workflow%3ABuild\n[build-badge]: https://github.com/lcharette/UF_UserProfile/workflows/Build/badge.svg?branch=master\n[codecov]: https://codecov.io/gh/lcharette/UF_UserProfile\n[codecov-badge]: https://codecov.io/gh/lcharette/UF_UserProfile/branch/master/graph/badge.svg\n[styleci]: https://styleci.io/repos/83981830\n[styleci-badge]: https://styleci.io/repos/83981830/shield?branch=master\u0026style=flat\n\nThis Sprinkle makes it easy to add any custom fields to the user or group model. Simply create a new schema in you own sprinkle and you're done. Your new profile fields will be automatically integrated in the default UserFrosting interface.\n\n# Help and Contributing\n\nIf you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the [UserFrosting Chat](https://chat.userfrosting.com/) most of the time for direct support.\n\n# Installation\n\nEdit UserFrosting `app/sprinkles.json` file and add the following to the `require` list : `\"lcharette/uf_userprofile\": \"^3.0.0\"`. Also add `FormGenerator` and `UserProfile` to the `base` list. For example:\n\n```json\n{\n    \"require\": {\n        \"lcharette/uf_userprofile\": \"^3.0.0\"\n    },\n    \"base\": [\n        \"core\",\n        \"account\",\n        \"admin\",\n        \"FormGenerator\",\n        \"UserProfile\"\n    ]\n}\n```\n\nRun `composer update` then `php bakery bake` to install the sprinkle.\n\n# Usage\n\nTo add a custom profile fields to any user, you simply add a [FormGenerator](https://github.com/lcharette/UF_FormGenerator) compliant schema containing the `form` key as well as the traditional [validation schema](https://learn.userfrosting.com/routes-and-controllers/client-input/validation). The rest is generated by this Sprinkle.\n\nFor example, you can add the following to a `schema/userProfile/myFields.json` file inside your sprinkle to add a `location`, `occupation` and `gender` user field. With the associated locale keys, that's all you have to do to add a new user field to your UserFrosting setup.\n```json\n{\n    \"location\" : {\n        \"validators\" : {\n            \"length\" : {\n                \"label\" : \"LOCATION\",\n                \"min\" : 1,\n                \"max\" : 255,\n                \"message\" : \"VALIDATE.LENGTH_RANGE\"\n            }\n        },\n        \"form\": {\n            \"type\": \"text\",\n            \"label\": \"LOCATION\",\n            \"icon\": \"fa-globe\"\n        }\n    },\n    \"occupation\" : {\n        \"validators\" : {\n            \"length\" : {\n                \"label\" : \"OCCUPATION\",\n                \"min\" : 1,\n                \"max\" : 255,\n                \"message\" : \"VALIDATE.LENGTH_RANGE\"\n            }\n        },\n        \"form\": {\n            \"type\": \"textarea\",\n            \"label\": \"OCCUPATION\",\n            \"icon\": \"fa-briefcase\"\n        }\n    },\n    \"gender\" : {\n        \"validators\" : {},\n        \"form\": {\n            \"type\": \"select\",\n            \"label\": \"GENDER\",\n            \"icon\": \"fa-transgender\",\n            \"options\" : {\n                \"1\" : \"GENDER.MALE\",\n                \"2\" : \"GENDER.FEMALE\",\n                \"3\" : \"GENDER.NEUTRAL\"\n            }\n        }\n    }\n}\n```\n\nNote that the schema must be saved inside the `schema/userProfile/` directory of your sprinkle to be picked up automatically by the system. You might also want to run `php bakery clear-cache` command from the UserFrosting root since those fields are stored in cache for better performances.\n\nYou can also specify **groups** custom fields by saving any schema in the the `schema/groupProfile/` directory of your sprinkle.\n\n## Screenshots\n\n![Screenshot 1](/.github/screenshots/UF_UserProfile1.png?raw=true)\n![Screenshot 1](/.github/screenshots/UF_UserProfile2.png?raw=true)\n\n# License\nBy [Louis Charette](https://github.com/lcharette). Copyright (c) 2020, free to use in personal and commercial software as per the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcharette%2Fuf_userprofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcharette%2Fuf_userprofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcharette%2Fuf_userprofile/lists"}