summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10da184)
raw | patch | inline | side by side (parent: 10da184)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Sep 2009 10:29:06 +0000 (10:29 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Sep 2009 10:29:06 +0000 (10:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14203 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/posix/class_posixAccount.inc | patch | blob | history | |
gosa-core/plugins/personal/posix/generic.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index 308567239e53ce86c3eb54d2217e405a278b56e3..68866fa5b7dcf2ac980b49b5ffe924203f6903c2 100644 (file)
var $activate_shadowExpire= "0";
var $mustchangepassword= "0";
var $force_ids= 0;
+ var $gotoLastSystemLogin= "";
var $group_dialog= FALSE;
var $show_ws_dialog= FALSE;
var $secondaryGroups= array();
var $attributes = array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos",
"shadowMin", "shadowMax", "shadowWarning", "shadowInactive", "shadowLastChange",
- "shadowExpire", "gosaDefaultPrinter", "uid","accessTo","trustModel");
+ "shadowExpire", "gosaDefaultPrinter", "uid","accessTo","trustModel", "gotoLastSystemLogin");
var $objectclasses= array("posixAccount", "shadowAccount");
/* Load bases attributes */
plugin::plugin($config, $dn);
+ /* If gotoLastSystemLogin is available read it from ldap and create a readable
+ 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", 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]);
+ }
+
/* Setting uid to default */
if(isset($this->attrs['uid'][0])){
$this->uid = $this->attrs['uid'][0];
$smarty->assign("mustchangepasswordACL", $this->getacl("mustchangepassword",$SkipWrite));
}
+ // Set last system login
+ $smarty->assign("gotoLastSystemLogin",$this->gotoLastSystemLogin);
+
/* Fill calendar */
/* If this $this->shadowExpire is empty
use current date as base for calculating selectbox values.
diff --git a/gosa-core/plugins/personal/posix/generic.tpl b/gosa-core/plugins/personal/posix/generic.tpl
index a02e385f482f73ee58fceda3b9e34a9bc4a9336e..60584909685130ae0e1362106512c961e535c06d 100644 (file)
<td>{t}Status{/t}</td>
<td>{$status}</td>
</tr>
+{if $gotoLastSystemLogin}
+ <tr>
+ <td>{t}Last logon{/t}</td>
+ <td>{$gotoLastSystemLogin}</td>
+ </tr>
+{/if}
{/if}
</table>