mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #65952
[Bug 1969385] A change has been merged
Reviewed: https://reviews.mahara.org/c/mahara/+/12610
Committed: https://git.mahara.org/mahara/mahara/commit/64b5cc0d5199001530db4b638cc99d4c0087d409
Submitter: "Robert Lyon <robertl@xxxxxxxxxxxxxxx>"
Branch: main
commit 64b5cc0d5199001530db4b638cc99d4c0087d409
Author: Dianne Tennent <dianne.tennent@xxxxxxxxxxxxxxx>
Date: Tue Apr 19 13:11:00 2022 +1200
Bug 1969385: Fix maximum number of allowed accounts
For 'No Institution' - prevent falsly returning true when
no limit applied
Change-Id: Ia24d9314b9b22def7730c998f8a05f9058bea662
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1969385
Title:
Fix maximum number of allowed accounts
Status in Mahara:
Fix Committed
Bug description:
On dev.mahara.org after putting the 22.04RC1 on it, I'm getting
notifications that the maximum nubmer of accounts has been reached in
'No instiutiton' even though that institution doesn't have an account
limit.
Robert investigated and found:
This bit is wrong:
----
/**
* Returns true if the institution already has its full quota of users
* assigned to it.
*
* @return bool
*/
public function isFull() {
return ($this->maxuseraccounts != '') && ($this->countMembers() >= $this->maxuseraccounts);
}
---
needs to be: return (!empty($this->maxuseraccounts) && ($this->countMembers() >= $this->maxuseraccounts);
so that if $this->maxuseraccounts = null, or empty string or 0 it will return false (not full)
currently if $this->maxuseraccounts = 0 then it will go 0 is not an empty string and 0 is less than members (so is full)
even though 0 is meant to represent unlimited people
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1969385/+subscriptions
References