Commit info for scoop/lib/Scoop/Admin:
Modified Files:
Users.pm
Log Message:
Checking in two janra patches. One takes the new user emails out of the code
and puts them into blocks, while the other fixes some error messages coming out
the who's online code. Also including the new, table-bound whos_online box,
since it never made it into the default db.
Index: Users.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin/Users.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -r1.56 -r1.57
430d429
< #my $confirm_string = $S->rand_stuff(10);
442,447c441,444
< my $path = $S->{UI}->{VARS}->{rootdir};
< my $subject = "Welcome to $S->{UI}->{VARS}->{sitename}";
<
< # send the mail.
< #my $confirmurl = "$S->{UI}->{VARS}->{site_url}$path/newuser/confirm/$nick/$confirm_string";
< #$confirmurl =~ s/\s/%20/g;
---
> my $path = $S->{UI}->{VARS}->{site_url} . $S->{UI}->{VARS}->{rootdir};
> my $subject = $S->{UI}->{BLOCKS}->{new_user_email_subject};
> my $from = $S->{UI}->{VARS}->{new_user_email_from} || $S->{UI}->{VARS}->{local_email};
> my $sitename = $S->{UI}->{VARS}->{sitename};
451,455c448
< $showprefs=qq|
< After first logging in, you will be automatically redirected to your
< user preferences page, where you can change your password if you want
< to.
< |;
---
> $showprefs = $S->{UI}->{BLOCKS}->{new_user_email_showprefs};
458,470c451
< my $content = qq|
< Someone requested a new user account on $S->{UI}->{VARS}->{site_url}$path/
< and gave this email address as their contact.
<
< If this was you, please use the following username and password to log
< in:
<
< Username: $nick
< Password: $pass
< $showprefs
< If it wasn't you, please ignore this email. Our system will delete the
< account automatically if it remains unused. You will not get any
< further e-mail from us. The account is free.
---
> my $content = $S->{UI}->{BLOCKS}->{new_user_email};
472c453,458
< We hope you enjoy $S->{UI}->{VARS}->{sitename}!
---
> $content =~ s/%%nick%%/$nick/;
> $content =~ s/%%pass%%/$pass/;
> $content =~ s/%%url%%/$path/;
> $content =~ s/%%showprefs%%/$showprefs/;
> $content =~ s/%%from%%/$from/;
> $content =~ s/%%sitename%%/$sitename/;
474c460
< $S->{UI}->{VARS}->{local_email}|;
---
> $subject =~ s/%%sitename%%/$sitename/;
476c462
< $rv = $S->mail($email, $subject, $content);
---
> $rv = $S->mail($email, $subject, $content, $from);