I have problems editing the user that way. It is the best way, programmatically. The code seems to fail when it checks whether the user can be edited when given the correct user id (user/edit/80, for example).
I get better results by editing the content object directly, as a user is simply a content object. This code gives you an idea how to do this from a form in a template. Sometimes the variable $current_user is set in your current namespace. If not you can fetch it as I have shown. Note, you can test this just by typing a url directly into your browser... :)
Note, you need to make sure your user role is able to self edit their own details for this to work. Also, 3.2 has some bug fixes in it to make this work...
We saw a comment in svn commit logs a while ago about something in 3.2 that helps to fix this but to be honest im not 100% sure. I just know it seems to work... but we haven't heavily tested yet.
This thread speaks about what we did for 3.1 to get it all to work. There is a small patch in there you can apply.