Go to the latest version of this document.

# ``twisted`.`words`.`service`.`User``

class documentation

`class User: (source)`

Constructor: `User(name)`

Implements interfaces: `twisted.words.iwords.IUser`

View In Hierarchy

Undocumented

Method | `__init__` | Undocumented
Method | `itergroups` | Return an iterator of all groups of which this user is a member.
Method | `join` | Attempt to join the given group.
Method | `leave` | Discontinue participation in the given group.
Method | `loggedIn` | Invoked by the associated `IChatService` when login occurs.
Method | `logout` | Undocumented
Method | `send` | Send the given message to the given user or group.
Instance Variable | `groups` | Undocumented
Instance Variable | `lastMessage` | A POSIX timestamp indicating the time of the last message received from this user.
Instance Variable | `mind` | A reference to the mind which logged in to this user. Set if and only if the user is logged in.
Instance Variable | `name` | A short string, unique among users.
Instance Variable | `realm` | A reference to the Realm to which this user belongs. Set if and only if the user is logged in.
Instance Variable | `signOn` | A POSIX timestamp indicating this user's most recent sign on time.

def __init__(self, name): (source)

Undocumented

def itergroups(self): (source)
from `twisted.words.iwords.IUser`

Return an iterator of all groups of which this user is a member.

def join(self, group): (source)
from `twisted.words.iwords.IUser`

Attempt to join the given group.

Parameters
group:`IGroup` | Undocumented

Returns
`twisted.internet.defer.Deferred` | Undocumented

def leave(self, group, reason=None): (source)
from `twisted.words.iwords.IUser`

Discontinue participation in the given group.

Parameters
group:`IGroup` | Undocumented
reason | Undocumented

Returns
`twisted.internet.defer.Deferred` | Undocumented

def loggedIn(self, realm, mind): (source)
from `twisted.words.iwords.IUser`

Invoked by the associated `IChatService` when login occurs.

Parameters
realm | The `IChatService` through which login is occurring.
mind | The mind object used for cred login.

def logout(self): (source)

Undocumented

def send(self, recipient, message): (source)
from `twisted.words.iwords.IUser`

Send the given message to the given user or group.

Parameters
recipient:Either `IUser` or `IGroup` | Undocumented
message:`dict` | Undocumented

groups: `list` = (source)

Undocumented

lastMessage = (source)
from `twisted.words.iwords.IUser`

A POSIX timestamp indicating the time of the last message received from this user.

mind = (source)
from `twisted.words.iwords.IUser`

A reference to the mind which logged in to this user. Set if and only if the user is logged in.

name = (source)
from `twisted.words.iwords.IUser`

A short string, unique among users.

realm = (source)
from `twisted.words.iwords.IUser`

A reference to the Realm to which this user belongs. Set if and only if the user is logged in.

signOn = (source)
from `twisted.words.iwords.IUser`

A POSIX timestamp indicating this user's most recent sign on time.