plone/plone.api — pull request #170 by Tschanzt (2014-07-09 09:37:38+00:00)
Title: Use getUserById to find the user when given a User object in adopt_user.

Currently the adopt_user function assumes when given a user object that the userid and username are the same. But there are several situations where this isn't the case. So I updated the function to use getUserById when given a user.

I use the default plone.app.testing user for testing since his username and userid aren't the same.