ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using {username} to automatically pick up a users domain login id

April 17, 2012 2:48pm

Subscribe [2]
  • #1 / Apr 17, 2012 2:48pm

    From browsing the Forum logs, I have an issue that appears to be somewhat different from other {username} questions.  I am rewriting a corporate intranet into EE 2.3.1 and I want to use the {username} to populate the user’s id automatically in various task workflows.

    I want this tag to automatically pick up the user’s identity when they have logged onto the domain and opened the intranet, without requiring an additional login on the intranet homepage.  Initial testing, when I was logged into the EE control panel, led me to believe this would happen automatically, but when Im logged out of the CP or when another user is accessing my test pages, all that is displayed is the literal “{username}” tag.  I have also tried similar alternative tags, but they have the same issue.

    My question: is there an EE add-on that I can buy/download that will allow a built-in EE tag to automatically pickup a domain-level user id?  If not, what would be the best approach code-wise, or would I be relegated to having to consider forcing the users to log in to the intranet?

    Thanks in advance for any assistance,

    Jake

  • #2 / Apr 18, 2012 12:21pm

    Shane Eckert

    7174 posts

    Hello bjacob,

    Welcome to the forums!

    How are your users logging into the domain? What kind of information is being passed that we can use? Is this through LDAP?

    Please let me know and I will see what kind of options we have.

    Cheers,

  • #3 / Apr 19, 2012 3:06pm

    We’re running Windows Server 2008 R2 servers using LDAP and Active Directory.

    Thanks for any assistance you can provide.

    bj

  • #4 / Apr 20, 2012 1:45pm

    Shane Eckert

    7174 posts

    Hey bjacob,

    Awesome. Can you give this a try? LDAP Authentication. This should get you going.

    Please let me know how it works for you.

    Cheers,

  • #5 / Apr 23, 2012 10:25am

    Thanks for the Extension Install.

    Got the object code placed in my third-party folder and went to CP to enable.  Got the following error (please be aware that I have not set up any Members yet, so I don’t know if that may be the issue here):

    A Database Error Occurred
    Error Number: 1366

    Incorrect integer value: ‘’ for column ‘extension_id’ at row 1

    INSERT INTO `exp_extensions` (`extension_id`, `class`, `method`, `hook`, `settings`, `priority`, `version`, `enabled`) VALUES (’‘, ‘Nce_ldap_ext’, ‘login_authenticate_start’, ‘login_authenticate_start’, ‘a:15:{s:11:\"admin_email\";s:19:\"admin@your_site.com\";s:10:\"from_email\";s:18:\"ldap@your_site.com\";s:9:\"mail_host\";s:14:\"your_mail_host\";s:12:\"mail_message\";s:397:\"This is an automated message from the ExpressionEngine LDAP authentication system.\n-------------------------\n\n{name} has just logged in for the first time. This has created an ExpressionEngine account for them using their LDAP details.\nTo complete their account details, please log in to http://{host} and update their member group, profile and \‘people\’ weblog entry.\nTheir username is: {username}\”;s:25:\“use_ldap_account_creation\”;s:3:\“yes\”;s:9:\“ldap_host\”;s:21:\“ldap://your_ldap_host\”;s:9:\“ldap_port\”;s:3:\“389\”;s:16:\“ldap_search_base\”;s:16:\“ldap_search_base\”;s:16:\“ldap_search_user\”;s:16:\“ldap_search_user\”;s:20:\“ldap_search_password\”;s:20:\“ldap_search_password\”;s:23:\“ldap_username_attribute\”;s:23:\“ldap_username_attribute\”;s:21:\“ldap_character_encode\”;s:12:\“Windows-1252\”;s:21:\“no_ldap_login_message\”;s:86:\“LDAP authentication seems to be down at the moment. Please contact your administrator.\”;s:24:\“first_time_login_message\”;s:198:\“This is your first time logging in! Your account has been automatically created for you, but your administrator may still need to alter your settings. Please contact them if you require more access.\”;s:18:\“created_user_group\”;s💯\“5\”;}’, 10, ‘1.3’, ‘y’)

    Filename: {I removed this for security purposes - bj}

    Line Number: 330
    ————————————

    Any ideas what I need to do to enable this extension?

    Thanks again,

    bj

  • #6 / Apr 24, 2012 12:47pm

    Shane Eckert

    7174 posts

    Hello bjacob,

    I am not sure what is going on with this. It sounds like the Add-On needs some configuration.

    Did you get a chance to read the documentation? You might also consider contacting Front about this as well.

    What if you do set up members? Does that fix things?

    Please let me know.

    Cheers,

  • #7 / Apr 25, 2012 5:41pm

    Busy day here, so just getting back to this now.

    Tomorrow I’ll try setting up a member list and then trying the enable again.  I’ll also contact the author.  I’ll update my post when I have my results.

    <UPDATE> Created a member group and added my boss and a co-worker.  Tried again to enable the LDAP extension and received the same error message.  I have emailed Front this error.

  • #8 / Apr 26, 2012 3:43pm

    Shane Eckert

    7174 posts

    Hello bjacob,

    Please keep me posted. Would love to hear how this plays out with Front.

    Cheers,

  • #9 / May 02, 2012 10:10am

    Here’s the response I received from Front:

    Hi Brian,

    I’m sorry that we’ve been unable to help. I’m afraid that the resources we share are provided ‘as is’ and that we’re not able to dedicate time to resolving issues.

    Sorry I can’t be of more help,

    Paul McKeever

    ———————————————————————————

    Are there any other LDAP modules available for purchase that may be worth trying?

    Thanks,

    bj

  • #10 / May 02, 2012 4:30pm

    Shane Eckert

    7174 posts

    Hello Brian,

    I am sorry to hear that.

    That’s the only plugin I am aware of that works with EE2.

    I can move this to the community forum if you would like. May be some suggestions there.

    Cheers,

  • #11 / May 02, 2012 5:30pm

    Please move this then.  This is a show-stopper for me on several fronts and I need to find a solution asap.

    Thanks again for your help.

    bj

  • #12 / May 07, 2012 9:28am

    Shane,

    Did this thread ever get moved to another forum?  If so, could you please provide me the link?

    Thanks again,

    Brian

  • #13 / May 24, 2012 9:41am

    Shane,

    Made a little progress (of sorts).  I was able to get LDAP to enable, but then it locked up access to our control panel and we had to do a complete restore to get access again.

    Just curious what recommendations you could make at this point before we try the LDAP extension again…

    Feel free to post this any other forum that could provide some insight.

    Thanks again,

    bj

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases