Fixed a couple of unreported bugs.
This commit is contained in:
parent
54cf3b1d29
commit
8943c7df58
4 changed files with 6 additions and 22 deletions
|
|
@ -509,16 +509,11 @@ sub www_updateAccount {
|
||||||
if ($session{user}{userId} != 1) {
|
if ($session{user}{userId} != 1) {
|
||||||
if ($session{form}{identifier1} ne "password") {
|
if ($session{form}{identifier1} ne "password") {
|
||||||
$error = _hasBadPassword($session{form}{identifier1},$session{form}{identifier2});
|
$error = _hasBadPassword($session{form}{identifier1},$session{form}{identifier2});
|
||||||
unless ($error) {
|
|
||||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
|
|
||||||
$passwordStatement = ', identifier='.quote($encryptedPassword);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$error .= _hasBadUsername($session{form}{username});
|
$error .= _hasBadUsername($session{form}{username});
|
||||||
if ($error eq "") {
|
if ($error eq "") {
|
||||||
$u = WebGUI::User->new($session{user}{userId});
|
$u = WebGUI::User->new($session{user}{userId});
|
||||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
|
$u->identifier(Digest::MD5::md5_base64($session{form}{identifier1})) if ($session{form}{identifier1} ne "password");
|
||||||
$u->identifier($encryptedPassword) if ($session{form}{identifier1} ne "password");
|
|
||||||
$u->username($session{form}{username});
|
$u->username($session{form}{username});
|
||||||
$output .= WebGUI::International::get(81).'<p>';
|
$output .= WebGUI::International::get(81).'<p>';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ sub www_manageGroupsInGroup {
|
||||||
$f = WebGUI::HTMLForm->new;
|
$f = WebGUI::HTMLForm->new;
|
||||||
$f->hidden("op","addGroupsToGroupSave");
|
$f->hidden("op","addGroupsToGroupSave");
|
||||||
$f->hidden("gid",$session{form}{gid});
|
$f->hidden("gid",$session{form}{gid});
|
||||||
@array = WebGUI::SQL->buildArray("select groupId from groupGroupings where inGroup=$session{form}{gid}");
|
@array = WebGUI::SQL->buildArray("select groupId from groupGroupings where inGroup='$session{form}{gid}'");
|
||||||
push(@array,$session{form}{gid});
|
push(@array,$session{form}{gid});
|
||||||
# push(@array,1); #visitors
|
# push(@array,1); #visitors
|
||||||
# push(@array,2); #registered users
|
# push(@array,2); #registered users
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ sub isInGroup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
### Check for groups of groups.
|
### Check for groups of groups.
|
||||||
@data = WebGUI::SQL->buildArray("select groupId from groupGroupings where inGroup=$gid");
|
@data = WebGUI::SQL->buildArray("select groupId from groupGroupings where inGroup='$gid'");
|
||||||
foreach $groupId (@data) {
|
foreach $groupId (@data) {
|
||||||
$session{isInGroup}{$groupId} = isInGroup($groupId, $uid);
|
$session{isInGroup}{$groupId} = isInGroup($groupId, $uid);
|
||||||
if ($session{isInGroup}{$groupId}) {
|
if ($session{isInGroup}{$groupId}) {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ use WebGUI::Authentication;
|
||||||
|
|
||||||
$authMethod = $u->authMethod("WebGUI");
|
$authMethod = $u->authMethod("WebGUI");
|
||||||
$dateCreated = $u->dateCreated;
|
$dateCreated = $u->dateCreated;
|
||||||
$identifier = $u->identifier("somepassword");
|
|
||||||
$karma = $u->karma;
|
$karma = $u->karma;
|
||||||
$lastUpdated = $u->lastUpdated;
|
$lastUpdated = $u->lastUpdated;
|
||||||
$languagePreference = $u->profileField("language",1);
|
$languagePreference = $u->profileField("language",1);
|
||||||
|
|
@ -166,25 +165,15 @@ sub deleteFromGroups {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
# This method is depricated and is provided only for reverse compatibility. See WebGUI::Authentication instead.
|
||||||
=head2 identifier ( [ value ] )
|
|
||||||
|
|
||||||
Returns the password for this user.
|
|
||||||
|
|
||||||
=item value
|
|
||||||
|
|
||||||
If specified, the identifier is set to this value.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub identifier {
|
sub identifier {
|
||||||
my ($class, $value);
|
my ($class, $value);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
$value = shift;
|
$value = shift;
|
||||||
if (defined $value) {
|
if (defined $value) {
|
||||||
$class->{_user}{"identifier"} = $value;
|
$class->{_user}{"identifier"} = $value;
|
||||||
WebGUI::SQL->write("update users set identifier=".quote($value).",
|
WebGUI::SQL->write("update authentication set fieldData=".quote($value)."
|
||||||
lastUpdated=".time()." where userId=$class->{_userId}");
|
where userId=$class->{_userId} and authMethod='WebGUI' and fieldName='identifier'");
|
||||||
}
|
}
|
||||||
return $class->{_user}{"identifier"};
|
return $class->{_user}{"identifier"};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue