This stored procedure is helpful in scripting permissions for a user in all databases it exist in.
If @newuidname has a value of '', it will scroll all databases and search for its permissions.
If @newuidname has a valid username, it will only script out the permissions for @uidname where @newuidname does not already have the same permissions or roles assigned.
If @RolePermissions = 1 the permissions of the roles @uidname belong to will also be scripted.
I initially used sp_helprotect, but then I had to do it database by database individually, this way I can run it once for all. This sp can be compiled on any database and it will still go through all databases.
Hope it is useful.