more session related bug fixes
This commit is contained in:
parent
5705131fcf
commit
89a6e4efdb
4 changed files with 7 additions and 7 deletions
|
|
@ -61,7 +61,7 @@ sub www_auth {
|
|||
my $session = shift;
|
||||
my $auth;
|
||||
($auth) = $session->db->quickArray("select authMethod from users where username=".$session->db->quote($session->form->process("username"))) if($session->form->process("username"));
|
||||
my $authMethod = getInstance($auth);
|
||||
my $authMethod = getInstance($session,$auth);
|
||||
my $methodCall = shift || $session->form->process("method") || "init";
|
||||
if(!$authMethod->isCallable($methodCall)){
|
||||
$session->errorHandler->security("access uncallable auth method on page '".$session->asset->getTitle."' [".$session->asset->pageId."].");
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ sub www_editSettings {
|
|||
-extras=>"onChange=\"active=operateHidden(this.options[this.selectedIndex].value,active)\""
|
||||
);
|
||||
foreach (@{$session->config->get("authMethods")}) {
|
||||
my $authInstance = WebGUI::Operation::Auth::getInstance($_,1);
|
||||
my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,1);
|
||||
my $style = '" style="display: none;' unless ($_ eq $session->setting->get("authMethod"));
|
||||
$tabform->getTab("auth")->raw('<tr id="'.$_.$style.'"><td colspan="2" width="100%"><table border="0" cellspacing="0" cellpadding="0" width="100%">'.$authInstance->editUserSettingsForm.'<tr><td width="304"> </td><td width="496"> </td></tr></table></td></tr>');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ sub www_editUser {
|
|||
-extras=>"onChange=\"active=operateHidden(this.options[this.selectedIndex].value,active)\""
|
||||
);
|
||||
foreach (@{$session->config->get("authMethods")}) {
|
||||
my $authInstance = WebGUI::Operation::Auth::getInstance($_,$u->userId);
|
||||
my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,$u->userId);
|
||||
my $style = '" style="display: none;' unless ($_ eq $u->authMethod);
|
||||
$tabform->getTab("account")->raw('<tr id="'.$_.$style.'"><td colspan="2" align="center"><table>'.$authInstance->editUserForm.'<tr><td width="170"> </td><td> </td></tr></table></td></tr>');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,15 +137,15 @@ Deletes this user.
|
|||
sub delete {
|
||||
my $self = shift;
|
||||
$self->uncache;
|
||||
require WebGUI::Operation::Auth;
|
||||
$self->session->db->write("delete from users where userId=".$self->session->db->quote($self->{_userId}));
|
||||
$self->session->db->write("delete from userProfileData where userId=".$self->session->db->quote($self->{_userId}));
|
||||
foreach my $groupId (@{$self->session->user->getGroups($self->userId)}) {
|
||||
WebGUI::Group->new($self->session,$groupId)->deleteUsers([$self->userId]);
|
||||
}
|
||||
$self->session->db->write("delete from messageLog where userId=".$self->session->db->quote($self->{_userId}));
|
||||
my $authMethod = WebGUI::Operation::Auth::getInstance($self->authMethod,$self->{_userId});
|
||||
require WebGUI::Operation::Auth;
|
||||
my $authMethod = WebGUI::Operation::Auth::getInstance($self->session,$self->authMethod,$self->{_userId});
|
||||
$authMethod->deleteParams($self->{_userId});
|
||||
$self->session->db->write("delete from userProfileData where userId=".$self->session->db->quote($self->{_userId}));
|
||||
$self->session->db->write("delete from users where userId=".$self->session->db->quote($self->{_userId}));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue