
sql.auth.secUser.list.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of butor-auth-dao Show documentation
Show all versions of butor-auth-dao Show documentation
This project is an authentication module (DAO).
SELECT
u.id,
u.active,
u.firmId,
u.creationDate,
u.displayName,
u.fullName,
u.email,
u.phone,
u.firstName,
u.lastLoginDate,
u.lastName,
u.resetInProgress,
u.missedLogin,
u.attributes,
u.revNo,
u.stamp,
u.userId,
c.firmName
FROM secUser u
left join (__authDataSql__) dfu on
dfu.dataType = 'firm' and
(dfu.d1 = '*' or (dfu.d1 = u.firmId))
left join (__authDataSql__) du on
du.dataType = 'user' and
(du.d1 = '*' or (du.d1 = u.id))
LEFT JOIN secFirm c ON
c.firmId = u.firmId
WHERE
(dfu.d1 is not null or du.d1 is not null) and
(:email IS NULL OR email = :email) AND
(:firmId = 0 OR u.firmId = :firmId) AND
(:displayName IS NULL OR
(id like :displayName OR
displayName like :displayName OR
firstName like :displayName OR
lastName like :displayName OR
fullName like :displayName OR
email like :displayName)
)
ORDER BY displayName ASC
© 2015 - 2025 Weber Informatics LLC | Privacy Policy