Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2016, 01:12 AM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 48,950
tahbikat is on a distinguished road
Default Sudden Errors with Usergroup

This error is popping up on my site suddenly, and it won't let me log in. Any help? :/

I have been tinkering with some things, namely adding a pet sorting mod, but I'm not sure how/if it's conflicting with this.


PHP Code:
WarningInvalid argument supplied for foreach() in /home/mysgardia/public_html/classes/class_usergroup.php on line 28

Warning
Cannot modify header information headers already sent by (output started at /home/mysgardia/public_html/classes/class_usergroup.php:28in /home/mysgardia/public_html/classes/class_usercreator.php on line 26

Warning
Cannot modify header information headers already sent by (output started at /home/mysgardia/public_html/classes/class_usergroup.php:28in /home/mysgardia/public_html/classes/class_usercreator.php on line 27 
class_usergroup.php
PHP Code:
<?php

use Resource\Native\Object;

class 
Usergroup extends Object{
  
// The usergroup class, what should I say? umm... Its temporary anyway as the usergroup system will be revised in Mys v1.4.0's new ACP project.

  
public $gid 0;
  public 
$groupname;
  protected 
$canadopt;
  protected 
$canpm;
  protected 
$cancp;
  protected 
$canmanageadopts;
  protected 
$canmanagecontent;
  protected 
$canmanageads;
  protected 
$canmanagesettings;
  protected 
$canmanageusers;
  
  
  public function 
__construct($group){
      
// Fetch the basic properties for usergroup
      
      
$mysidia Registry::get("mysidia");
      if(empty(
$group)) $group "visitors";
      
$whereclause = (is_numeric($group))?"gid ='{$group}'":"groupname ='{$group}'";
      
$row $mysidia->db->select("groups", array(), $whereclause)->fetchObject();
      
// loop through the anonymous object created to assign properties
      
foreach($row as $key => $val){
         
$this->$key $val;         
      }
      
// Successfully instantiate the usergroup object, it usually is assigned as a property to user object, but can exist on its own      
  
}
  
  public static function 
fetchgroup($groupname){
      
$mysidia Registry::get("mysidia");
      
$usergroup $mysidia->db->select("groups", array(), "groupname ='{$groupname}'")->fetchObject();
      return 
$usergroup;
  }
  
  public function 
getpermission($perms){
      if(isset(
$this->$perms)) return $this->$perms;
      else throw new 
Exception('The permission name does not exist, something must be very very wrong');
  }
  
  public function 
setpermission($fields = array()){
      
$mysidia Registry::get("mysidia");
      if(!
is_assoc($perm)) throw new Exception('The parameter must be an associative array...');
      
$mysidia->db->update("groups",$field,"gid ='{$this->gid}'");
  }
  
  public function 
deletegroup(){
      
$mysidia Registry::get("mysidia");
      
$mysidia->db->delete("groups""gid ='{$this->gid}'");
  }

  public function 
__toString(){
      return 
$this->groupname;
  }
}
?>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:58 AM.

Currently Active Users: 679 (0 members and 679 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636