| 1 | package Lemonldap::NG::Portal::CertificateResetByMail::Demo; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use Mouse; | ||
| 5 | use Lemonldap::NG::Portal::Main::Constants qw(PE_OK); | ||
| 6 | |||
| 7 | our $VERSION = '2.0.15'; | ||
| 8 | |||
| 9 | sub init { | ||
| 10 | return 1; | ||
| 11 | } | ||
| 12 | |||
| 13 | ## @method int modifCertificate | ||
| 14 | # Do nothing | ||
| 15 | # @result Lemonldap::NG::Portal constant | ||
| 16 | sub modifCertificate { | ||
| 17 | my ( $self, $req, $newCertif, $userCertif ) = @_; | ||
| 18 | my $uid = | ||
| 19 | $req->user || $req->userData->{_user} || $req->sessionInfo->{_user}; | ||
| 20 | |||
| 21 | $Lemonldap::NG::Portal::UserDB::Demo::demoAccounts{$uid} = { | ||
| 22 | uid => $uid, | ||
| 23 | cn => $uid . ' ' . uc $uid, | ||
| 24 | mail => $uid . '@badwolf.org', | ||
| 25 | newCert => $newCertif, | ||
| 26 | userCert => $userCertif, | ||
| 27 | }; | ||
| 28 | |||
| 29 | return PE_OK; | ||
| 30 | } | ||
| 31 | |||
| 32 | 1; |