[Xerte] Re: Names go missing from user profiles (Xerte 1.8)

Linda Pan L.Pan at bbk.ac.uk
Thu Mar 6 18:23:04 GMT 2014


Hi,

I'm hopeful we may have found the cause of this problem.

 

Whilst searching for the Ldap.php file in our test installation so I
could run Pat's test, I realised we had two slightly different versions
of the Ldap.php file,  at

./library/Xerte/Authentication/Ldap.php and 

./library/library/Xerte/Authentication/Ldap.php

 

Comparing them, I found that the version we were running with at
./library/Xerte/Authentication/Ldap.php

was missing four lines of code that existed in the other version.

 

I tested them both, and with one version, the name disappeared after a
user logged in, whereas this didn't happen with the other one. I could
only test this with my own login, but it's looking promising so I've
copied the 'good' version of the file to our live installation.

 

For info, the difference  is below:

 

############################################

 

Ldap.php_BAD - names disapear when users login...

 

    public function getFirstname()

    {

        if (isset($this->_record['fn'])) {

            return $this->_record['fn'];

        }

        return null;

    }

 

    public function getSurname()

    {

        if (isset($this->_record['sn'])) {

            return $this->_record['sn'];

        }

        return null;

    }

 

 

############################################

 

Ldap.php_GOOD - names don't disappear on login...

 

    public function getFirstname()

    {

        if (isset($this->_record['fn'])) {

            return $this->_record['fn'];

        }

      if (isset($this->_record['firstname'])) {

        return $this->_record['firstname'];

      }

        return null;

    }

 

    public function getSurname()

    {

        if (isset($this->_record['sn'])) {

            return $this->_record['sn'];

        }

      if (isset($this->_record['surname'])) {

        return $this->_record['surname'];

      }

        return null;

    }

 

###########################################

 

 

Thanks very much for pointing us in the right direction,

 

Best wishes,

 

Linda

 

 

Linda Pan
Web Team, IT Services, 
Birkbeck, University of London, 
Egmont House, Tavistock Place, 
WC1H 9SF 
020 7380 3188
l.pan at bbk.ac.uk

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat L (pgogy)
Sent: 06 March 2014 14:46
To: Xerte discussion list
Subject: [Xerte] Re: Names go missing from user profiles (Xerte 1.8)

 

 

Somewhere around line 160 of ldap.php is 

 

$this->_record = array('firstname' => $entry[0]['givenname'][0],
'surname' => $entry[0]['sn'][0], 'username' => $xot_username);

 

before that line try adding

 

echo "<pre>";

print_r($entry);

die();

 

try logging in, or getting a user whose name has vanished to login (on
the dev box) and see what entry is bringing back

 

On Thu, Mar 6, 2014 at 2:18 PM, Linda Pan <L.Pan at bbk.ac.uk> wrote:

Hi Pat,

It is a live installation, but I have a duplicate system on a
development server where I could make code changes.

 

I will try and run some test to see if I can pin down this behaviour to
specific  actions.

 

One thought - does it matter that our Admin user does not exist in the
ActiveDirectory?

 

Thanks,

 

Linda

 

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat L (pgogy)
Sent: 06 March 2014 13:39


To: Xerte discussion list
Subject: [Xerte] Re: Names go missing from user profiles (Xerte 1.8)

 

Hi Linda,

Is the birkbeck install live? Or can you make a change to the code (via
editting over FTP?)

Thanks

Pat

 

On Thu, Mar 6, 2014 at 1:06 PM, Linda Pan <L.Pan at bbk.ac.uk> wrote:

Hi,

Just to add we are not using Kerberos/customised code.

 

The authetication setting in config.php is LDAP:

   $xerte_toolkits_site->authentication_method = 'Ldap';

 

And the server we connect to is ActiveDirectory.

 

In the database, the  sitedetails.integration_config_path value is
empty.

ldap.ldap_filter is 'cn='

ldap.ldap_filter_attr  Is 'sAMAccountName'

 

 

We are running version 1.8 rather 2.0 because we couldn't make version
2.0 work with our existing templates.

 

Thanks,

 

Linda

 

Linda Pan
Web Team, IT Services, 
Birkbeck, University of London, 
Egmont House, Tavistock Place, 
WC1H 9SF 

020 7380 3188
l.pan at bbk.ac.uk

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat L (pgogy)
Sent: 05 March 2014 18:31
To: Xerte discussion list
Subject: [Xerte] Re: Names go missing from user profiles (Xerte 1.8)

 

Hi Linda,

 

The names are usually populated via logging in. From recollection
Birkbeck aren't using LDAP but some kerberos code they wrote themselves?

 

If this data isn't returned via the query, then when log in occurs I
think it may wipe out the details entered. Could possibly be a simple
fix code wise but could also be something up with the authentication
code.

 

Hope this helps

 

Pat

 

On Wed, Mar 5, 2014 at 6:22 PM, Linda Pan <L.Pan at bbk.ac.uk> wrote:

Hi all,
We have an issue here at Birkbeck with Xerte 1.8.

When logged in as Admin, and checking the 'Users' list, there are a
number of entries where the names have disappeared, leaving only the
'View' link. Under User, most accounts have the name and then a link
"View", which displays the ID number, first name , surname  and
username. But on our installation some accounts have the fields for
First name and Surname empty and consequently it is difficult to find
users or the templates that belong to users. We've tried re-adding the
names several times, but they go missing again.

Did anybody experience anything similar and know how to fix this?
Any help or hints in the right direction would be very much appreciated.

Kind regards

Linda Pan



Web Team, IT Services,
Birkbeck, University of London,
Egmont House, Tavistock Place,
WC1H 9SF
l.pan at bbk.ac.uk



_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment
may still contain software viruses which could damage your computer
system, you are advised to perform your own checks. Email communications
with the University of Nottingham may be monitored as permitted by UK
legislation.



 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20140306/b220543c/attachment-0001.html>


More information about the Xerte mailing list