How can I use the ldap features in cfscript within Lucee? The
documentation http://docs.lucee.org/reference/tags/ldap.html states that
it is supported in cfscript but when I do
var l = new ldap();
I get an error: invalid component definition, can’t find component [ldap]
If I call a tag-based UDF that wraps the cfldap tag then I am able to get
the ldap query to run. This all with the Lucee server built-in to
CommandBox.
Thanks!
Wes
This does not work:
var l = new ldap(); // ← problem here
l.setServer(ldapServer);
l.setPort(ldapPort);
l.setUsername(ldapUsername);
l.setPassword(ldapPassword);
var qryResult = l.query(attributes=ldapAttr, start=ldapRoot, scope=ldapScope, filter=ldapFilter);
ldap
server=ldapServer
port=ldapPort
username=ldapUsername
password=ldapPassword
name="results"
start=ldapStart
filter=ldapFilter
attributes=ldapAttributes
scope=ldapScope;
On 10 March 2016 at 18:27, Wesley Hampton <@Wesley_Hampton> wrote:
> How can I use the ldap features in cfscript within Lucee?
WesOn Thursday, March 10, 2016 at 3:16:13 PM UTC-5, Igal wrote:
is this just the way that tags translate to cfscript, or just certain ones
like ldap?
Most tags will translate this way. There are a few exceptions though, for
example, Dump will be used as a function, i.e. dump(var: x, label: “X”);
When the tag has a body then you would wrap the body with { braces }, and
if you need to output text into the body you would use writeOutput() or
echo() inside, for example,
will become:
savecontent variable=“contents” {
dump(x); // the dump of x will be now in the variable contents
Wow, okaaaay…that worked! Looks peculiar but since I’m new to Lucee is
this just the way that tags translate to cfscript, or just certain ones
like ldap?
Thanks a lot – learned something new here today…very puzzled…but did
learn
Wes
On Thursday, March 10, 2016 at 2:21:12 PM UTC-5, Julian Halliwell wrote:
is this just the way that tags translate to cfscript, or just certain
ones like ldap?
Most tags will translate this way. There are a few exceptions though,
for example, Dump will be used as a function, i.e. dump(var: x, label: “X”);
When the tag has a body then you would wrap the body with { braces },
and if you need to output text into the body you would use writeOutput()
or echo() inside, for example,
will become:
savecontent variable=“contents” {
dump(x); // the dump of x will be now in the variable contents
Wow, okaaaay…that worked! Looks peculiar but since I’m new to Lucee
is this just the way that tags translate to cfscript, or just certain
ones like ldap?
Thanks a lot – learned something new here today…very puzzled…but
did learn
Wes
On Thursday, March 10, 2016 at 2:21:12 PM UTC-5, Julian Halliwell wrote:
Try simply removing <cf and replacing > with ;
<cfscript>
ldap
server=ldapServer
port=ldapPort
username=ldapUsername
password=ldapPassword
name="results"
start=ldapStart
filter=ldapFilter
attributes=ldapAttributes
scope=ldapScope;
</cfscript>
On 10 March 2016 at 18:27, Wesley Hampton <wpha...@gmail.com <javascript:>> wrote:
> How can I use the ldap features in cfscript within Lucee?
–
Love Lucee? Become a supporter and be part of the Lucee project today!