Jump to:

10845 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » External authenticator and a weblogin form

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 499 Views
  • hmph
    Avatar
    Community Member
    1 Post

    External authenticator and a weblogin form Link to this post

    Background-
    We've been using silverstripe for about 3 years as our companies intranet. A few months ago we switched hosting and decided to upgrade to the latest version (we were at 2.2). After the upgrade some of our module's and scripting was not compatible, most of which we have changed or recovered. This is one of the items that worked previously but for the life of me I can't get to work properly now.

    Specific Info -
    We use external authenticator for our employee login. We use its IMAP driver and our e-mail server for authentication. Works great. Once a employee is logged in one of the navigation menu links is to our Webmail. This link uses a form and javascript submit script to automatically log in the user to their webmail and references the current users email address and password for the value's of the input fields. This is the same login credentials used to initially sign in.

    Problem-
    The password value is no longer retrieved and users aren't automatically logged in with their credentials. Originally this was done like so in the Page.php

    function GetUserPass()
       {
          return Session::get("MemberPass");      
       }


    And then was called in the Navigation.ss like so

    <form id="WebLogin" action="http://mail.domain.com" method="post" target="_blank">
                         <input type="hidden" name="_user" value="$GetUserEmail">
                         <input type="hidden" name="_pass" value="$GetUserPass">
                         <input type="hidden" name="_action" value="login">
                      </form>
                      <a href="#" onclick="javascript: document.getElementById('WebLogin').submit();">
                         Webmail
                      </a>


    Since neither of these were initially working I changed the _user value to value="$CurrentMember.Email" which works fine.

    I know there has been some changes in naming that I've missed somewhere or just some slight updating to the code but I just can't seem to get it. Hoping some fresh eyes will help! Thanks to anyone who can help and to all of you who already have with other posts throughout this forum!

    499 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.