Public Member Functions | Data Fields

ilLocalUser Class Reference

Public Member Functions

 ilLocalUser ($a_parent_id)
 Constructor public.
 setParentId ($a_parent_id)
 getParentId ()
 _getUserData ($a_filter)
 _getFolderIds ()
 _getAllUserIds ($a_filter=0)
 _getUserFolderId ()

Data Fields

 $db
 $parent_id

Detailed Description

Definition at line 33 of file class.ilLocalUser.php.


Member Function Documentation

ilLocalUser::_getAllUserIds ( a_filter = 0  ) 

Definition at line 99 of file class.ilLocalUser.php.

References $query, $res, $row, $users, and _getFolderIds().

Referenced by ilObjCategoryGUI::assignSaveObject(), ilObjCategoryGUI::listUsersObject(), and ilObjCategoryGUI::performDeleteUsersObject().

        {
                global $ilDB;
                switch($a_filter)
                {
                        case 0:
                                if(ilLocalUser::_getFolderIds())
                                {
                                        $where = "WHERE time_limit_owner IN ";
                                        $where .= '(';
                                        $where .= implode(",",ilLocalUser::_getFolderIds());
                                        $where .= ')';

                                }
                                else
                                {
                                        $where = "WHERE time_limit_owner IN ('')";
                                }

                                break;

                        default:
                                $where = "WHERE time_limit_owner = '".$a_filter."'";

                                break;
                }
                
                $query = "SELECT usr_id FROM usr_data ".$where;
                $res = $ilDB->query($query);

                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $users[] = $row->usr_id;
                }

                return $users ? $users : array();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilLocalUser::_getFolderIds (  ) 

Definition at line 80 of file class.ilLocalUser.php.

References $query, $rbacsystem, $res, and $row.

Referenced by _getAllUserIds(), and ilObjCategoryGUI::listUsersObject().

        {
                global $ilDB,$rbacsystem;

                $query = "SELECT DISTINCT(time_limit_owner) as parent_id FROM usr_data ";

                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        if($rbacsystem->checkAccess('read_users',$row->parent_id) or $rbacsystem->checkAccess('cat_administrate_users',$row->parent_id))
                        {
                                if($row->parent_id)
                                {
                                        $parent[] = $row->parent_id;
                                }
                        }
                }
                return $parent ? $parent : array();
        }

Here is the caller graph for this function:

ilLocalUser::_getUserData ( a_filter  ) 

Definition at line 64 of file class.ilLocalUser.php.

References $users, and ilObjUser::_getAllUserData().

Referenced by ilObjCategoryGUI::listUsersObject().

        {
                include_once './classes/class.ilObjUser.php';

                $users_data = ilObjUser::_getAllUserData(array("login","firstname","lastname","time_limit_owner"),-1);

                foreach($users_data as $usr_data)
                {
                        if(!$a_filter or $a_filter == $usr_data['time_limit_owner'])
                        {
                                $users[] = $usr_data;
                        }
                }
                return $users ? $users : array();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilLocalUser::_getUserFolderId (  ) 

Definition at line 137 of file class.ilLocalUser.php.

Referenced by ilObjCategoryGUI::__buildFilterSelect().

        {
                return 7;
        }

Here is the caller graph for this function:

ilLocalUser::getParentId (  ) 

Definition at line 58 of file class.ilLocalUser.php.

        {
                return $this->parent_id;
        }

ilLocalUser::ilLocalUser ( a_parent_id  ) 

Constructor public.

Parameters:
string scriptname
int user_id

Definition at line 45 of file class.ilLocalUser.php.

        {
                global $ilDB;

                $this->db =& $ilDB;
                $this->parent_id = $a_parent_id;
                
        }

ilLocalUser::setParentId ( a_parent_id  ) 

Definition at line 54 of file class.ilLocalUser.php.

        {
                $this->parent_id = $a_parent_id;
        }


Field Documentation

ilLocalUser::$db

Definition at line 35 of file class.ilLocalUser.php.

ilLocalUser::$parent_id

Definition at line 37 of file class.ilLocalUser.php.


The documentation for this class was generated from the following file: