From: janw Date: Wed, 10 Jun 2009 16:32:53 +0000 (+0000) Subject: Fix for gotoLastSystemLogin Format, fallback to sambaLogonTime if available. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=955a344438fdc29716f627039e03890657fb01c3;p=gosa.git Fix for gotoLastSystemLogin Format, fallback to sambaLogonTime if available. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13704 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index adb14ec18..95b0960a7 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -147,10 +147,12 @@ class user extends plugin plugin::plugin ($config, $dn); /* If gotoLastSystemLogin is available read it from ldap and create a readable - date time string. + date time string, fallback to sambaLogonTime if available. */ if(isset($this->attrs['gotoLastSystemLogin'][0]) && preg_match("/^[0-9]*$/",$this->attrs['gotoLastSystemLogin'][0])){ - $this->gotoLastSystemLogin = date("d.m.Y H:i:s", $this->attrs['gotoLastSystemLogin'][0]); + $this->gotoLastSystemLogin = date("d.m.Y H:i:s", strtotime($this->attrs['gotoLastSystemLogin'][0])); + } else if(isset($this->attrs['sambaLogonTime'][0]) && preg_match("/^[0-9]*$/",$this->attrs['sambaLogonTime'][0])){ + $this->gotoLastSystemLogin = date("d.m.Y H:i:s", $this->attrs['sambaLogonTime'][0]); } $this->orig_dn = $this->dn;