benja-M-1/php-opencloud — pull request #1 by benja-M-1 (2014-04-16 20:15:17+00:00)
Title: Proposal to fix the user creation issue with OpenStack

This is the [pr](rackspace/php-opencloud/pull/340) I opened 2 days ago but on the master branch instead of the working one.
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 :)