Class WBBUserSession

com.woltlab.wbb.data.user

Description

Represents a user session in the forum.

  • author: Marcel Werk
  • copyright: 2001-2009 WoltLab GmbH
  • license: WoltLab
DatabaseObject
   |
   --User
      |
      --UserSession
         |
         --AbstractWBBUserSession
            |
            --WBBUserSession

Method Summary

Return Name
WBBUserSession __construct([ $userID = null], [ $row = null], [ $username = null])
void closeCategory(integer $boardID, [integer $close = 1])
DisplayableAvatar getAvatar()
void getBoardSubscriptions()
void getBoardVisits()
integer getBoardVisitTime(integer $boardID)
void getClosedCategories()
void getGroupData()
void getIgnoredBoards()
void getInvitations()
integer getLastMarkAllAsReadTime()
integer getOutstandingGroupApplications()
integer getOutstandingModerations()
void getOutstandingNotifications()
integer getSubscriptionsUnreadCount()
void handleData( $data)
void hasSubscriptions()
boolean ignores( $userID)
void init()
boolean isBoardSubscription(integer $boardID)
boolean isClosedCategory(integer $boardID)
boolean isGroupLeader()
boolean isIgnoredBoard(integer $boardID)
integer isModerator()
void setBoardVisitTime(integer $boardID)
void setLastMarkAllAsReadTime( $timestamp)
void setLastVisitTime( $timestamp)
void setThreadVisitTime(integer $threadID, [ $timestamp = TIME_NOW])
void subscribeBoard(integer $boardID)
void unsubscribeBoard(integer $boardID)
void update()
static void updateBoardLastActivityTime(integer $userID, [integer $timestamp = TIME_NOW])
void updateBoardSubscription(integer $boardID)
static void updateLastActivityTime(integer $userID, [integer $timestamp = TIME_NOW])

Variables

$avatar

protected DisplayableAvatar $avatar = null

displayable avatar object.


$boardSubscriptions

protected mixed $boardSubscriptions


$boardVisits

protected mixed $boardVisits


$closedCategories

protected mixed $closedCategories


$hasSubscriptions

protected mixed $hasSubscriptions = null


$ignoredBoards

protected mixed $ignoredBoards


$ignores

protected mixed $ignores = null


$invitations

protected mixed $invitations = null


$outstandingGroupApplications

protected mixed $outstandingGroupApplications = null


$outstandingModerations

protected mixed $outstandingModerations = null


$outstandingNotifications

protected mixed $outstandingNotifications = null


$subscriptionsUnreadCount

protected mixed $subscriptionsUnreadCount = null


Inherited variables from AbstractWBBUserSession

AbstractWBBUserSession::$boardModeratorPermissions, AbstractWBBUserSession::$boardPermissions


Inherited variables from UserSession

UserSession::$groupData


Inherited variables from User

User::$groupIDs, User::$sqlGroupBy, User::$sqlJoins, User::$sqlSelects, User::$userOptions


Inherited variables from DatabaseObject

DatabaseObject::$data

Methods

__construct

public WBBUserSession __construct([ $userID = null], [ $row = null], [ $username = null])

Parameters:

  • $userID
  • $row
  • $username

Redefinition of: UserSession::__construct()


closeCategory

public void closeCategory(integer $boardID, [integer $close = 1])

Closes the category with the given board id for this user.

Parameters:

  • $boardID
  • $close -
    1. closes the category -1 opens the category

getAvatar

public DisplayableAvatar getAvatar()

Returns the avatar of this user.


getBoardSubscriptions

protected void getBoardSubscriptions()

Loads the subscribed boards of this user from database.


getBoardVisits

protected void getBoardVisits()

Loads the board visits of this user from database.


getBoardVisitTime

public integer getBoardVisitTime(integer $boardID)

Returns the board visit of this user for the board with the given board id.

  • return: board visit of this user for the board with the given board id

Parameters:

  • $boardID

getClosedCategories

protected void getClosedCategories()

Loads the closed categories of this user from database.


getGroupData

protected void getGroupData()


getIgnoredBoards

protected void getIgnoredBoards()

Loads the ignored boards of this user from database.


getInvitations

public void getInvitations()


getLastMarkAllAsReadTime

public integer getLastMarkAllAsReadTime()

Returns the last mark all as read timestamp.


getOutstandingGroupApplications

public integer getOutstandingGroupApplications()

Returns the number of outstanding group applications.


getOutstandingModerations

public integer getOutstandingModerations()

Returns the number of outstanding thread / post moderations.


getOutstandingNotifications

public void getOutstandingNotifications()


getSubscriptionsUnreadCount

public integer getSubscriptionsUnreadCount()

Returns the number of unread subscribed threads.


handleData

protected void handleData( $data)

Parameters:

  • $data

Redefinition of: UserSession::handleData()


hasSubscriptions

public void hasSubscriptions()

Returns true, if the user has subscriptions.


ignores

public boolean ignores( $userID)

Returns true, if the active user ignores the given user.

Parameters:

  • $userID

init

public void init()

Initialises the user session.

Redefinition of: UserSession::init()


isBoardSubscription

public boolean isBoardSubscription(integer $boardID)

Returns true, if the board with the given board id is a subscribed board of this user.

  • return: true, if the board with the given board id is a subscribed board of this user

Parameters:

  • $boardID

isClosedCategory

public boolean isClosedCategory(integer $boardID)

Returns true, if the category with the given board id is closed by this user.

Parameters:

  • $boardID

isGroupLeader

public boolean isGroupLeader()

Returns true, if the user is a group leader.


isIgnoredBoard

public boolean isIgnoredBoard(integer $boardID)

Returns true, if the board with the given board id is ignored by this user.

Parameters:

  • $boardID

isModerator

public integer isModerator()

Returns true, if the user is a moderator.


setBoardVisitTime

public void setBoardVisitTime(integer $boardID)

Sets the board visit of this user for the board with the given board id.

Parameters:

  • $boardID

setLastMarkAllAsReadTime

public void setLastMarkAllAsReadTime( $timestamp)

Sets the last mark all as read timestamp.

Parameters:

  • $timestamp

setLastVisitTime

public void setLastVisitTime( $timestamp)

Sets the global board last visit timestamp.

Parameters:

  • $timestamp

setThreadVisitTime

public void setThreadVisitTime(integer $threadID, [ $timestamp = TIME_NOW])

Sets the thread visit of this user for the thread with the given thread id.

Parameters:

  • $threadID
  • $timestamp

subscribeBoard

public void subscribeBoard(integer $boardID)

Subscribes the board with the given board id for this user.

Parameters:

  • $boardID

unsubscribeBoard

public void unsubscribeBoard(integer $boardID)

Unsubscribes the board with the given board id for this user.

Parameters:

  • $boardID

update

public void update()

Updates the user session.

Redefinition of: UserSession::update()


updateBoardLastActivityTime

public static void updateBoardLastActivityTime(integer $userID, [integer $timestamp = TIME_NOW])

Updates the board last activity timestamp in user database.

Parameters:

  • $userID
  • $timestamp

updateBoardSubscription

public void updateBoardSubscription(integer $boardID)

Updates the subscription of the board with the given board for this user.

Parameters:

  • $boardID

updateLastActivityTime

public static void updateLastActivityTime(integer $userID, [integer $timestamp = TIME_NOW])

Updates the global last activity timestamp in user database.

Parameters:

  • $userID
  • $timestamp

Inherited methods from AbstractWBBUserSession

AbstractWBBUserSession::getBoardModeratorPermission(), AbstractWBBUserSession::getBoardPermission(), AbstractWBBUserSession::getGroupData()


Inherited methods from UserSession

UserSession::__construct(), UserSession::checkPermission(), UserSession::getGroupData(), UserSession::getPermission(), UserSession::handleData(), UserSession::init(), UserSession::saveStatus(), UserSession::update()


Inherited methods from User

User::__construct(), User::checkCookiePassword(), User::checkPassword(), User::getEditor(), User::getGroupIDs(), User::getNewest(), User::getSalt(), User::getUserOption(), User::getUserOptionCache(), User::getUserOptionID(), User::getUsers(), User::handleData(), User::__get(), User::__toString()


Inherited methods from DatabaseObject

DatabaseObject::__construct(), DatabaseObject::handleData(), DatabaseObject::sort(), DatabaseObject::__get()