mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #65940
[Bug 1969385] Re: Fix maximum number of allowed accounts
** Changed in: mahara
Status: Confirmed => In Progress
--
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:
In Progress
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