projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edf90a3
)
field name is primary_svc, not primary
author
ivan
<ivan>
Mon, 21 Jun 2004 10:45:15 +0000
(10:45 +0000)
committer
ivan
<ivan>
Mon, 21 Jun 2004 10:45:15 +0000
(10:45 +0000)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
f2cd488
..
6caa197
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-61,6
+61,11
@@
sub login {
);
return { error => 'User not found.' } unless $svc_acct;
);
return { error => 'User not found.' } unless $svc_acct;
+ my $conf = new FS::Conf;
+ my $pkg_svc = $svc_acct->cust_svc->pkg_svc;
+ return { error => 'Only primary user may log in.' }
+ if $conf->exists('selfservice_server-primary_only')
+ && ( ! $pkg_svc || $pkg_svc->primary_svc ne 'Y' );
return { error => 'Incorrect password.' }
unless $svc_acct->check_password($p->{'password'});
return { error => 'Incorrect password.' }
unless $svc_acct->check_password($p->{'password'});
@@
-75,12
+80,6
@@
sub login {
$session->{'custnum'} = $cust_main->custnum;
}
$session->{'custnum'} = $cust_main->custnum;
}
- my $conf = new FS::Conf;
- my $pkg_svc = $svc_acct->cust_svc->pkg_svc;
- return { error => 'Only primary user may log in.' }
- if $conf->exists('selfservice_server-primary_only')
- && ( ! $pkg_svc || $pkg_svc->primary ne 'Y' );
-
my $session_id;
do {
$session_id = md5_hex(md5_hex(time(). {}. rand(). $$))
my $session_id;
do {
$session_id = md5_hex(md5_hex(time(). {}. rand(). $$))