mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 05:56:27 +02:00
Refactoring some mailing methodes and adding cms text
This commit is contained in:
parent
75a23dc3f4
commit
7736fee89d
20 changed files with 376 additions and 731 deletions
|
@ -757,31 +757,30 @@ sub save_transact(){
|
|||
|
||||
|
||||
#Send sms after payable check and !int13
|
||||
sub smsack(){
|
||||
sub smsack {
|
||||
my $self = shift;
|
||||
my $ctadr = shift;
|
||||
$smstrans->sms_ack_digest($ctadr);
|
||||
return;
|
||||
}
|
||||
|
||||
#Send email after payable check and !int04
|
||||
sub emailack(){
|
||||
sub emailack {
|
||||
my $self = shift;
|
||||
my $varenv = shift;
|
||||
my $adr_id = shift || "";
|
||||
|
||||
system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "emailack" "$adr_id" ""`);
|
||||
#TODO
|
||||
#system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_emailack' '$adr_id' ''");
|
||||
system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_emailack' '$adr_id' ''");
|
||||
return;
|
||||
}
|
||||
|
||||
#Password forgotten send email
|
||||
sub send_password(){
|
||||
sub send_password {
|
||||
my $self = shift;
|
||||
my $varenv = shift;
|
||||
my $email = shift || "";
|
||||
my $coo = shift || "";
|
||||
my $owner = shift || "";
|
||||
|
||||
my $dbh = "";
|
||||
$email = $q->escapeHTML($email);
|
||||
$email =~ s/\s//g;
|
||||
|
||||
|
@ -789,12 +788,27 @@ sub send_password(){
|
|||
|
||||
if($email && $email =~ /\w\@\w/ && $pwmd5 && length($pwmd5) > 20 && $email !~ /$dbt->{copri_conf}->{test_accounts}/i){
|
||||
my $pwsha256=sha256_base64($pwmd5) || "";
|
||||
$db->updater("contentadr","1","1","txt04","$pwsha256","$owner","txt08","ilike","$email");
|
||||
system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "send_password" "$email" "$coo"`);
|
||||
#TODO
|
||||
#system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_password' '$c_id' ''");
|
||||
}
|
||||
my $authref = {
|
||||
table => "contentadr",
|
||||
fetch => "one",
|
||||
template_id => "202",
|
||||
txt08 => "ilike::" . $q->escapeHTML($email),
|
||||
int05 => "1",
|
||||
};
|
||||
my $ctadr = { c_id => 0 };
|
||||
$ctadr = $dbt->fetch_record($dbh,$authref);
|
||||
my $c_id = $ctadr->{c_id};
|
||||
|
||||
my $update_primary = {
|
||||
table => "contentadr",
|
||||
mtime => "now()",
|
||||
owner => "$owner",
|
||||
txt04 => "$pwsha256",
|
||||
};
|
||||
$dbt->update_record($dbh,$update_primary,$ctadr) if($c_id > 0);
|
||||
system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_password' '$c_id' '' '$coo'");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#sigbike just like caching and not realy used by app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue