NAME
Whatbot::Database::Table::UserAlias - Track user aliases
SYNOPSIS
use Whatbot::Database::Table::UserAlias;
DESCRIPTION
Whatbot::Database::Table::UserAlias tracks a one user to many aliases relationship.
METHODS
- alias( $user, $alias )
-
Set a new alias for a user. If a user isn't being tracked, it will start being tracked. If the alias already exists, this is a no-op. Returns true on success.
- user_for_alias( $alias )
-
Return a username attached to the given alias. Returns nothing if the alias is not found.
- aliases_for_user( $user )
-
Return an arrayref of aliases for the given user.
-
Retrieve all related users for this string, which could be other aliases or an attached user.
- canonical_user( $user_or_alias )
-
Like user_for_alias, returns a username attached to the given alias if one exists, but returns the alias if a parent username is not found.
- remove( $user, $alias? )
-
Remove an alias from a user. If no alias is provided, removes everything for that user. Returns true on success.
LICENSE/COPYRIGHT
Be excellent to each other and party on, dudes.