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