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{form}{identifier1} ne "password") {
|
||||
$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});
|
||||
if ($error eq "") {
|
||||
$u = WebGUI::User->new($session{user}{userId});
|
||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
|
||||
$u->identifier($encryptedPassword) if ($session{form}{identifier1} ne "password");
|
||||
$u->identifier(Digest::MD5::md5_base64($session{form}{identifier1})) if ($session{form}{identifier1} ne "password");
|
||||
$u->username($session{form}{username});
|
||||
$output .= WebGUI::International::get(81).'<p>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ sub www_manageGroupsInGroup {
|
|||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","addGroupsToGroupSave");
|
||||
$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,1); #visitors
|
||||
# push(@array,2); #registered users
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ sub isInGroup {
|
|||
}
|
||||
}
|
||||
### 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) {
|
||||
$session{isInGroup}{$groupId} = isInGroup($groupId, $uid);
|
||||
if ($session{isInGroup}{$groupId}) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ use WebGUI::Authentication;
|
|||
|
||||
$authMethod = $u->authMethod("WebGUI");
|
||||
$dateCreated = $u->dateCreated;
|
||||
$identifier = $u->identifier("somepassword");
|
||||
$karma = $u->karma;
|
||||
$lastUpdated = $u->lastUpdated;
|
||||
$languagePreference = $u->profileField("language",1);
|
||||
|
|
@ -166,25 +165,15 @@ sub deleteFromGroups {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 identifier ( [ value ] )
|
||||
|
||||
Returns the password for this user.
|
||||
|
||||
=item value
|
||||
|
||||
If specified, the identifier is set to this value.
|
||||
|
||||
=cut
|
||||
|
||||
# This method is depricated and is provided only for reverse compatibility. See WebGUI::Authentication instead.
|
||||
sub identifier {
|
||||
my ($class, $value);
|
||||
$class = shift;
|
||||
$value = shift;
|
||||
if (defined $value) {
|
||||
$class->{_user}{"identifier"} = $value;
|
||||
WebGUI::SQL->write("update users set identifier=".quote($value).",
|
||||
lastUpdated=".time()." where userId=$class->{_userId}");
|
||||
WebGUI::SQL->write("update authentication set fieldData=".quote($value)."
|
||||
where userId=$class->{_userId} and authMethod='WebGUI' and fieldName='identifier'");
|
||||
}
|
||||
return $class->{_user}{"identifier"};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue