Línea 142... |
Línea 142... |
142 |
* This reports back if the category has been deleted or the config value is different.
|
142 |
* This reports back if the category has been deleted or the config value is different.
|
143 |
*
|
143 |
*
|
144 |
* @param int $categoryid The category id to check against.
|
144 |
* @param int $categoryid The category id to check against.
|
145 |
* @return bool True is the category checks out, otherwise false.
|
145 |
* @return bool True is the category checks out, otherwise false.
|
146 |
*/
|
146 |
*/
|
147 |
private static function check_profile_category(int $categoryid = null): bool {
|
147 |
private static function check_profile_category(?int $categoryid = null): bool {
|
148 |
global $DB;
|
148 |
global $DB;
|
149 |
$categoryname = self::get_category_name();
|
149 |
$categoryname = self::get_category_name();
|
150 |
$categorydata = $DB->get_record('user_info_category', ['name' => $categoryname]);
|
150 |
$categorydata = $DB->get_record('user_info_category', ['name' => $categoryname]);
|
151 |
if (empty($categorydata)) {
|
151 |
if (empty($categorydata)) {
|
152 |
return false;
|
152 |
return false;
|