All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sql.auth.secUser.list.sql Maven / Gradle / Ivy

There is a newer version: 1.0.31
Show newest version
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