title: PassWordChangeForm for other user than current one
body: <p>I tried to follow some tutorials to implement the password change functionality, but the problem is, that its always for the currently authenticated user. I want for example an admin to be able to change the password of another user (not through the admin panel).</p>
  <pre><code>class PasswordChangeForm(PasswordChangeForm):
      def __init__(self, *args, **kwargs):
          super(PasswordChangeForm, self).__init__(*args, **kwargs)
          self.fields['old_password'].widget.attrs['class'] = 'form-control'
          self.fields['new_password1'].widget.attrs['class'] = 'form-control'
          self.fields['new_password2'].widget.attrs['class'] = 'form-control'
  </code></pre>
  <p>My view looks like this:</p>
  <pre><code>def changepassword(request):
      user = User.objects.get(id = request.POST.get(&quot;id&quot;))
      if request.POST.get(&quot;type&quot;) == &quot;user_changepw&quot;:
          form = PasswordChangeForm(user=user)
      else:
          form = PasswordChangeForm(data=request.POST, user=user)
          if form.is_valid():
              form.save()
      return render(request, 'user_changepw.html')
  </code></pre>
  <p>The user is coming here from a list of all the users with corresponding buttons that have as input the id of that user and also a hidden input &quot;user_changepw&quot;, so that the form isnt throwing errors the first time you get on the site. But this also seems to be the problem, because after that the &quot;id&quot; value in the POST request is lost, so that the attempt to fetch the user form the DB always fails, beacuse <code>request.POST.get(&quot;id&quot;)</code> is now None. What we be a good solution to keep the user-id in the function or how to pass it through so that it persists also cases, where the form threw errors?</p>