// FindUsersByUsernameOrEmail return a list of users searched by username or email
FindUsersByUsernameOrEmail return a list of users searched by username or email
// FindUsersByUsernameOrEmail return a list of users searched by username or email
func (ur *UserOracleRepository) FindUsersByUsernameOrEmail(q string, page int) []models.User {
	query := `SELECT * FROM
		(
			SELECT a.*, rownum r__
			FROM
			(
				` + FIND_BY_EMAIL_OR_USERNAME + `
			) a
			WHERE rownum < ((:page * 10) + 1 )
		)
		WHERE r__ >= (((:page-1) * 10) + 1)`
	rows, err := ur.Tx.Query(query, "%"+q+"%", "%"+q+"%", page)
	if err != nil {
		return []models.User{}
	}
	return RowsToUser(rows, true)
}
func ( ur * UserOracleRepository ) FindUsersByUsernameOrEmail ( q string , page int ) [ ] models . User { query := `SELECT * FROM
		(
			SELECT a.*, rownum r__
			FROM
			(
				` + FIND_BY_EMAIL_OR_USERNAME + `
			) a
			WHERE rownum < ((:page * 10) + 1 )
		)
		WHERE r__ >= (((:page-1) * 10) + 1)` rows , err := ur . Tx . Query ( query , " " + q + " " , " " + q + " " , page ) if err != nil { return [ ] models . User { } } return RowsToUser ( rows , true ) }
FindUsersByUsernameOrEmail return a list of users searched by username or email
FindUsersByUsernameOrEmail return a list of users searched by username or email