rackspace/php-opencloud — pull request #340 by benja-M-1 (2014-04-14 21:37:12+00:00)
Title: Proposal to fix the user creation issue with OpenStack

Hi,

the opencloud library does not send the right parameters to the OpenStack API according to the [API reference](http://api.openstack.org/api-ref-identity-v2.html#os-ksadm-admin-ext).

Here is what the library sends
```json
{
"user": {
"username": "foo",
"enabled": true,
"email": "foo@bar.fr",
}
}
```
but it should be

```json
{
"user": {
"name": "foo",
"enabled": true,
"email": "foo@bar.fr",
"OS-KSADM:password": "secrete"
}
}
```

This fix tries to solve two things:
* it replaces the keys of the payload by their aliases if they exist
* it change the key "username" to "name" by the aliasing system

I can provide test if you want but before I would like to know if I did it the right way or want to have some feedback before going further.

Thanks :)