summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b3fa3c)
raw | patch | inline | side by side (parent: 6b3fa3c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Aug 2008 11:50:14 +0000 (11:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Aug 2008 11:50:14 +0000 (11:50 +0000) |
-Added attribute to user class and template.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12238 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12238 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/generic/class_user.inc | patch | blob | history | |
gosa-core/plugins/personal/generic/generic.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index 08ba9015ccd611f515028f102dd4bc5a09c96e94..008390c28a9287eda194b8b53167158ce35c764c 100644 (file)
var $plHeadline= "Generic";
var $plDescription= "Edit organizational user settings";
+ /* The attribute gosaLastSystemLogin represents the timestamp of the last
+ successfull login on the users workstation.
+ Read the FAQ to get a hint about how to configure this.
+ */
+ var $gosaLastSystemLogin = "";
+
/* Plugin specific values */
var $base= "";
var $orig_base= "";
/* Load base attributes */
plugin::plugin ($config, $dn);
+ /* If gosaLastSystemLogin is available read it from ldap and create a readable
+ date time string.
+ */
+ if(isset($this->attrs['gosaLastSystemLogin'][0]) && preg_match("/^[0-9]*$/",$this->attrs['gosaLastSystemLogin'][0])){
+ $this->gosaLastSystemLogin = date("d.m.Y H:i:s", $this->attrs['gosaLastSystemLogin'][0]);
+ }
+
$this->orig_dn = $this->dn;
$this->new_dn = $dn;
}
$smarty= get_smarty();
+ $smarty->assign("gosaLastSystemLogin",$this->gosaLastSystemLogin);
/* Fill calendar */
if ($this->dateOfBirth == "0"){
diff --git a/gosa-core/plugins/personal/generic/generic.tpl b/gosa-core/plugins/personal/generic/generic.tpl
index 5706d15259b44ea5698e916c23e772a28cc3488c..a1e95f071dc642b1eba0002a512124cc91f27fb9 100644 (file)
</tr>
{/if}
+ {if $gosaLastSystemLogin}
+ <tr>
+ <td>{t}Last logon{/t}</td>
+ <td>{$gosaLastSystemLogin}</td>
+ </tr>
+ {/if}
</table>
</td>
</tr>