ezsystems/ezpublish-legacy — pull request #849 by yannickroger (2013-12-09 17:20:33+00:00)
Title: Fix EZP-20574: Creating a user with an existing username disables the us...

...ername field

Link : https://jira.ez.no/browse/EZP-20574

## Description

This method is used in https://github.com/ezsystems/ezpublish-legacy/blob/master/design/standard/templates/content/datatype/edit/ezuser.tpl?source=c#L21

ezuser is not versioned, there is not draft managment for this attribute. Data are directly created in database.

So when an error pops up (like when a login is not available), the line has already been inserted while creating the attribute in the database. Making `hasStoredLogin()` returning `true` making the field disabled.

This fix makes sure the object containing the ezuser attribute has not been publish (you can edit the login has long has the object has never been published).

## Tests
Manual tests