freeside/FS/FS svc_acct.pm,1.156,1.157
ivan
ivan at pouncequick.420.am
Wed May 26 06:02:33 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv31125
Modified Files:
svc_acct.pm
Log Message:
update acct_sql export some more to export to alias table also and in general be more configurable
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- svc_acct.pm 8 May 2004 07:46:31 -0000 1.156
+++ svc_acct.pm 26 May 2004 13:02:31 -0000 1.157
@@ -1190,6 +1190,39 @@
}
+=item crypt_password
+
+Returns an encrypted password, either by passing through an encrypted password
+in the database or by encrypting a plaintext password from the database.
+
+=cut
+
+sub crypt_password {
+ my $self = shift;
+ #false laziness w/shellcommands.pm
+ #eventually should check a "password-encoding" field
+ if ( length($self->_password) == 13
+ || $self->_password =~ /^\$(1|2a?)\$/ ) {
+ $self->_password;
+ } else {
+ crypt(
+ $self->_password,
+ $saltset[int(rand(64))].$saltset[int(rand(64))]
+ );
+ }
+}
+
+=item virtual_maildir
+
+Returns $domain/maildirs/$username/
+
+=cut
+
+sub virtual_maildir {
+ my $self = shift;
+ $self->domain. '/maildirs/'. $self->username. '/';
+}
+
=back
=head1 SUBROUTINES
More information about the freeside-commits
mailing list