View the given user on the user page

        :param user: the user to view
        :type user: :class:`jukeboxcore.djadapter.models.User`
        :returns: None
        :rtype: None
        :raises: None

def view_user(self, user):
        """View the given user on the user page

        :param user: the user to view
        :type user: :class:`jukeboxcore.djadapter.models.User`
        :returns: None
        :rtype: None
        :raises: None
        """
        log.debug('Viewing user %s', user.username)
        self.cur_user = None
        self.pages_tabw.setCurrentIndex(9)
        self.user_username_le.setText(user.username)
        self.user_first_le.setText(user.first_name)
        self.user_last_le.setText(user.last_name)
        self.user_email_le.setText(user.email)

        prjrootdata = treemodel.ListItemData(['Name', 'Short', 'Path', 'Created', 'Semester', 'Status', 'Resolution', 'FPS', 'Scale'])
        prjrootitem = treemodel.TreeItem(prjrootdata)
        prjs = djadapter.projects.filter(users=user)
        for prj in prjs:
            prjdata = djitemdata.ProjectItemData(prj)
            treemodel.TreeItem(prjdata, prjrootitem)
        self.user_prj_model = treemodel.TreeModel(prjrootitem)
        self.user_prj_tablev.setModel(self.user_prj_model)

        taskrootdata = treemodel.ListItemData(['Name'])
        taskrootitem = treemodel.TreeItem(taskrootdata)
        self.user_task_model = treemodel.TreeModel(taskrootitem)
        self.user_task_treev.setModel(self.user_task_model)
        tasks = djadapter.tasks.filter(users=user)
        assets = {}
        shots = {}
        atypes = {}
        seqs = {}
        prjs = {}
        for t in tasks:
            tdata = djitemdata.TaskItemData(t)
            titem = treemodel.TreeItem(tdata)
            e = t.element
            if isinstance(e, djadapter.models.Asset):
                eitem = assets.get(e)
                if not eitem:
                    edata = djitemdata.AssetItemData(e)
                    eitem = treemodel.TreeItem(edata)
                    assets[e] = eitem
                egrp = e.atype
                egrpitem = atypes.get(egrp)
                if not egrpitem:
                    egrpdata = djitemdata.AtypeItemData(egrp)
                    egrpitem = treemodel.TreeItem(egrpdata)
                    atypes[egrp] = egrpitem
            else:
                eitem = shots.get(e)
                if not eitem:
                    edata = djitemdata.ShotItemData(e)
                    eitem = treemodel.TreeItem(edata)
                    shots[e] = eitem
                egrp = e.sequence
                egrpitem = seqs.get(egrp)
                if not egrpitem:
                    egrpdata = djitemdata.SequenceItemData(egrp)
                    egrpitem = treemodel.TreeItem(egrpdata)
                    seqs[egrp] = egrpitem
            if eitem not in egrpitem.childItems:
                eitem.set_parent(egrpitem)
            prj = egrp.project
            prjitem = prjs.get(prj)
            if not prjitem:
                prjdata = djitemdata.ProjectItemData(prj)
                prjitem = treemodel.TreeItem(prjdata, taskrootitem)
                prjs[prj] = prjitem
                assetdata = treemodel.ListItemData(["Asset"])
                assetitem = treemodel.TreeItem(assetdata, prjitem)
                shotdata = treemodel.ListItemData(["Shot"])
                shotitem = treemodel.TreeItem(shotdata, prjitem)
            else:
                assetitem = prjitem.child(0)
                shotitem = prjitem.child(1)
            if isinstance(egrp, djadapter.models.Atype) and egrpitem not in assetitem.childItems:
                egrpitem.set_parent(assetitem)
            elif isinstance(egrp, djadapter.models.Sequence) and egrpitem not in shotitem.childItems:
                egrpitem.set_parent(shotitem)
            titem.set_parent(eitem)

        self.cur_user = user