- Timestamp:
- 06/20/19 09:15:24 (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r2264 r2268 31 31 expire 32 32 endcircuit 33 lastlogin 33 34 locked 34 35 sshPublicKey -
trunk/LATMOS-Accounts/Changes
r2247 r2268 5 5 - Add task module Setattribute: set attribute for objects matching the 6 6 given filter 7 - Add lastlogin Attribute: allow to store last login date 7 8 8 9 5.2.23 -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm
r2262 r2268 18 18 our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 19 19 20 sub SCHEMA_VERSION { 3 4};20 sub SCHEMA_VERSION { 35 }; 21 21 22 22 =head1 NAME -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r2267 r2268 231 231 monitored => 1, 232 232 label => l('End of entrance'), 233 }, 234 lastlogin => { 235 inline => 1, 236 formtype => 'DATETIME', 237 monitored => 1, 238 label => l('Last login'), 239 set => sub { 240 my ($self, $values) = @_; 241 if ($values) { 242 my $sth = $base->db->prepare_cached( 243 q{ update "user" set lastlogin = $1 where (lastlogin < $1 or lastlogin IS NULL) and name = $2 } 244 ); 245 return $sth->execute($values, $self->object->id); 246 } else { 247 my $sth = $base->db->prepare_cached( 248 q{ update "user" set lastlogin = NULL where name = $2 } 249 ); 250 return $sth->execute($self->object->id); 251 } 252 }, 233 253 }, 234 254 _endEmployment => { -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/upgrade.pm
r2262 r2268 1261 1261 recompute => 1, 1262 1262 }, 1263 { 1264 ver => 35, 1265 sql => [ 1266 q{ 1267 ALTER TABLE "user" ADD COLUMN lastlogin timestamp with time zone 1268 } 1269 ], 1270 }, 1263 1271 ); 1264 1272 -
trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod
r2260 r2268 106 106 C<endcircuit> attribute become informationnal only. 107 107 108 =head2 Last Login attribute 109 110 The C<lastlogin> attribute is designed to store the last datetime user login on 111 any system. This attribute can only be set to a highter value or be unset. 112 113 This allow to set this attribute from various source and to keep only the latest 114 value. 115 108 116 =head2 User Employment 109 117
Note: See TracChangeset
for help on using the changeset viewer.