{"id":19571749,"url":"https://github.com/loadsys/cakephp-creatormodifier","last_synced_at":"2025-07-17T13:38:08.440Z","repository":{"id":35208086,"uuid":"39466962","full_name":"loadsys/CakePHP-CreatorModifier","owner":"loadsys","description":"A Cake 3 plugin that provides a Behavior to automatically set creator_id and modifier_id fields on save.","archived":false,"fork":false,"pushed_at":"2018-11-23T16:53:44.000Z","size":35,"stargazers_count":5,"open_issues_count":5,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T20:51:18.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/loadsys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-21T19:59:06.000Z","updated_at":"2023-09-08T16:59:49.000Z","dependencies_parsed_at":"2022-09-16T15:21:15.395Z","dependency_job_id":null,"html_url":"https://github.com/loadsys/CakePHP-CreatorModifier","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-CreatorModifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-CreatorModifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-CreatorModifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-CreatorModifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loadsys","download_url":"https://codeload.github.com/loadsys/CakePHP-CreatorModifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085145,"owners_count":21533821,"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":[],"created_at":"2024-11-11T06:19:55.395Z","updated_at":"2025-04-27T03:32:34.066Z","avatar_url":"https://github.com/loadsys.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CakePHP 3 CreatorModifier plugin\n\n[![Latest Version](https://img.shields.io/github/release/loadsys/CakePHP-CreatorModifier.svg?style=flat-square)](https://github.com/loadsys/CakePHP-CreatorModifier/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://travis-ci.org/loadsys/CakePHP-CreatorModifier.svg?branch=master\u0026style=flat-square)](https://travis-ci.org/loadsys/CakePHP-CreatorModifier)\n[![Coverage Status](https://coveralls.io/repos/loadsys/CakePHP-CreatorModifier/badge.svg)](https://coveralls.io/r/loadsys/CakePHP-CreatorModifier)\n[![Total Downloads](https://img.shields.io/packagist/dt/loadsys/cakephp-creatormodifier.svg?style=flat-square)](https://packagist.org/packages/loadsys/cakephp-creatormodifier)\n\nSets a `creator_id` and `modifier_id` on records during save using the logged in User.id field. Operates almost identically to the core's [Timestamp behavior](http://book.cakephp.org/3.0/en/orm/behaviors/timestamp.html).\n\n\n## Requirements\n\n* PHP 5.4.16+\n* CakePHP 3.0+\n\n\n## Installation\n\n### Composer\n\n````bash\n$ composer require loadsys/cakephp-creatormodifier:~1.0\n````\n\nIn your `config/bootstrap.php` file, add:\n\n```php\nPlugin::load('CreatorModifier', ['bootstrap' =\u003e false, 'routes' =\u003e false]);\n```\n\nOR\n\n```php\nbin/cake plugin load CreatorModifier\n```\n\n## Usage\n\n* Add this plugin for use in an Table, by adding this line to your Table's `initialize()` method.\n\n````php\n$this-\u003eaddBehavior('CreatorModifier.CreatorModifier');\n````\n\n* Or to customize the behavior\n\n````php\n$this-\u003eaddBehavior('CreatorModifier.CreatorModifier', [\n\t'events' =\u003e [\n\t\t'Model.beforeSave' =\u003e [\n\t\t\t// Field storing the User.id who created the record,\n\t\t\t// only triggers on beforeSave when the Entity is new.\n\t\t\t'user_who_created_me_id' =\u003e 'new',\n\n\t\t\t// Field storing the User.id who modified the record,\n\t\t\t// always triggers on beforeSave.\n\t\t\t'user_who_modified_me_id' =\u003e 'always'\n\t\t]\n\t],\n\t// The key to read from `\\Cake\\Network\\Request-\u003esession()-\u003eread();`\n\t// to obtain the User.id value to set during saves.\n\t'sessionUserIdKey' =\u003e 'Auth.User.id',\n]);\n````\n\n\n## Contributing\n\n### Code of Conduct\n\nThis project has adopted the Contributor Covenant as its [code of conduct](CODE_OF_CONDUCT.md). All contributors are expected to adhere to this code. [Translations are available](http://contributor-covenant.org/).\n\n### Reporting Issues\n\nPlease use [GitHub Isuses](https://github.com/loadsys/CakePHP-CreatorModifier/issues) for listing any known defects or issues.\n\n### Development\n\nWhen developing this plugin, please fork and issue a PR for any new development.\n\nSet up a working copy:\n```shell\n$ git clone git@github.com:YOUR_USERNAME/CakePHP-CreatorModifier.git\n$ cd CakePHP-CreatorModifier/\n$ composer install\n$ vendor/bin/phpcs --config-set installed_paths vendor/loadsys/loadsys_codesniffer,vendor/cakephp/cakephp-codesniffer\n```\n\nMake your changes:\n```shell\n$ git checkout -b your-topic-branch\n# (Make your changes. Write some tests.)\n$ vendor/bin/phpunit\n$ vendor/bin/phpcs -p --extensions=php --standard=Loadsys ./src ./tests\n```\n\nThen commit and push your changes to your fork, and open a pull request.\n\n## License\n\n[MIT](https://github.com/loadsys/CakePHP-CreatorModifier/blob/master/LICENSE.md)\n\n\n## Copyright\n\n[Loadsys Web Strategies](http://www.loadsys.com) 2016\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-creatormodifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floadsys%2Fcakephp-creatormodifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-creatormodifier/lists"}