diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 79f4e71..864af2e 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,4 +1,4 @@ -name: Build +name: Continuous Integration on: push: diff --git a/README.md b/README.md index 0eee206..ef1d92b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ LmcUser [![Latest Stable Version](http://poser.pugx.org/lm-commons/lmc-user/v)](https://packagist.org/packages/lm-commons/lmc-user) [![Total Downloads](http://poser.pugx.org/lm-commons/lmc-user/downloads)](https://packagist.org/packages/lm-commons/lmc-user) [![Build](https://github.com/visto9259/LmcUser/actions/workflows/build_test.yml/badge.svg)](https://github.com/visto9259/LmcUser/actions/workflows/build_test.yml) +![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2Flm-commons%2Flmcrbacmvc%2Fproperties%2Fvalues&query=%24%5B%3A1%5D.value&label=Maintenance%20Status) [![Gitter](https://badges.gitter.im/LM-Commons/community.svg)](https://gitter.im/LM-Commons/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Based on ZfcUser by Evan Coury and the ZF-Commons team diff --git a/src/Entity/User.php b/src/Entity/User.php index 1706fd0..74844f6 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -52,7 +52,12 @@ public function getId() */ public function setId($id) { - $this->id = (int) $id; + if (is_null($id)) { + $this->id = $id; + } + else { + $this->id = (int)$id; + } return $this; }