source: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/OCHelper/Accreq.pm @ 1904

Last change on this file since 1904 was 1365, checked in by nanardon, 9 years ago

Exchange manager and managerContact attribute to propagate manager to other bases

File size: 1.2 KB
Line 
1package LATMOS::Accounts::Bases::Sql::OCHelper::User;
2
3# $Id: Accreq.pm 2041 2010-04-18 13:16:39Z nanardon $
4
5=head1 NAME
6
7LATMOS::Accounts::Bases::Sql::OCHelper::User - Helper to create accreq
8object
9
10=cut
11
12use strict;
13use warnings;
14use base qw(LATMOS::Accounts::Bases::OCHelper);
15use LATMOS::Accounts::Utils;
16use POSIX qw(strftime);
17
18sub _step {
19    my ($self, $info) = @_;
20    if ($info->{step} == 0) {
21        $info->{step} = 1;
22        $info->{ask} = [
23            qw(givenName sn managerContact department)
24        ];
25
26    } elsif ($info->{step} == 1) {
27        if ($self->base->create_c_object($self->otype,
28                strftime('%Y%m%d%H%M%S', localtime),
29                %{$info->{contents} || {}},
30            )) {
31            return 'CREATED';
32        } else {
33            return 'ERROR';
34        }
35    } else {
36        return undef;
37    }
38}
39
40=head1 SEE ALSO
41
42L<LATMOS::Accounts>
43
44=head1 AUTHOR
45
46Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt>
47
48=head1 COPYRIGHT AND LICENSE
49
50Copyright (C) 2012 CNRS SA/CETP/LATMOS
51
52This library is free software; you can redistribute it and/or modify
53it under the same terms as Perl itself, either Perl version 5.10.0 or,
54at your option, any later version of Perl 5 you may have available.
55
56=cut
57
581;
Note: See TracBrowser for help on using the repository browser.