 SELECT lsl.id, u.id AS userid, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email, u.city, lsl.timecreated
                                 FROM {logstore_standard_log}   lsl
                                 JOIN {user}                    u    ON u.id = lsl.userid
                                WHERE lsl.action LIKE 'loggedin'
                                  AND lsl.target LIKE 'user'