List of databases which a user can access in SQL 2008 R2 Is it possible to create a list of all the databases where a specific user can access?

For example,

My user is 'Domain\MarySmith'. This user can access on a single database or can access many databases.  

I need a query like this:

SELECT All_Db_Name_I_Can_Acces 
FROM ServerSql 
WHERE Username = 'Domain\MarySmith'
Try with this

USE master;
GO
EXECUTE AS LOGIN = N'LoginName';
GO
SELECT name
FROM sys.sysdatabases
WHERE HAS_DBACCESS(name) = 1
GO
REVERT;