Part of lp.registry.interfaces.person View In Hierarchy
Known implementations: lp.registry.model.person.PersonSet
Attribute | title | Title |
Method | getTopContributors | Return the top contributors in Launchpad, up to the given limit. |
Method | isNameBlacklisted | Is the given name blacklisted by Launchpad Administrators? |
Method | createPersonAndEmail | Create and return an IPerson and IEmailAddress . |
Method | createPersonWithoutEmail | Create and return an IPerson without using an email address. |
Method | ensurePerson | Make sure that there is a person in the database with the given |
Method | getOrCreateByOpenIDIdentifier | Get or create a person for a given OpenID identifier. |
Method | newTeam | Create and return a new Team with given arguments. |
Method | get | Return the person with the given id or None if it's not found. |
Method | getByEmail | Return the person with the given email address. |
Method | getByName | Return the person with the given name, ignoring merged persons if |
Method | getByAccount | Return the IPerson with the given account, or None. |
Method | updateStatistics | Update statistics caches and commit. |
Method | peopleCount | Return the number of non-merged persons in the database as |
Method | teamsCount | Return the number of teams in the database as of the last |
Method | find | Return all non-merged Persons and Teams whose name, displayname or |
Method | findPerson | Return all non-merged Persons with at least one email address whose |
Method | findTeam | Return all Teams whose name, displayname or email address |
Method | latest_teams | Return the latest teams registered, up to the limit specified. |
Method | merge | Merge a person/team into another. |
Method | getValidPersons | Get all the Persons that are valid. |
Method | getPeopleWithBranches | Return the people who have branches. |
Method | getSubscribersForTargets | Return the set of subscribers for targets . |
Method | updatePersonalStandings | Update the personal standings of some people. |
Method | cacheBrandingForPeople | Prefetch Librarian aliases and content for personal images. |
IPerson
and IEmailAddress
.
The newly created EmailAddress will have a status of NEW and will be linked to the newly created Person.
An Account is also created, but this will change in the future!
If the given name is None, we generate a unique nickname from the email address given.
Parameters | The email address, as text. | |
rationale | An item of PersonCreationRationale to be used as
the person's creation_rationale. | |
comment | A comment explaining why the person record was created (usually used by scripts which create them automatically). Must be of the following form: "when %(action_details)s" (e.g. "when the foo package was imported into Ubuntu Breezy"). | |
name | The person's name. | |
displayname | The person's displayname. | |
password | The person's password. | |
passwordEncrypted | Whether or not the given password is encrypted. | |
registrant | The user who created this person, if any. | |
hide_email_addresses | Whether or not Launchpad should hide the person's email addresses from other users. | |
Raises | InvalidName | When the given name is not valid. |
InvalidEmailAddress | When the given email is not valid. | |
NameAlreadyTaken | When the given name is already in use. | |
EmailAddressAlreadyTaken | When the given email is already in use. | |
NicknameGenerationError | When no name is provided and we can't generate a nickname from the given email address. |
IPerson
without using an email address.Parameters | name | The person's name. |
comment | A comment explaining why the person record was created (usually used by scripts which create them automatically). Must be of the following form: "when %(action_details)s" (e.g. "when the foo package was imported into Ubuntu Breezy"). | |
displayname | The person's displayname. | |
registrant | The user who created this person, if any. | |
Raises | InvalidName | When the passed name isn't valid. |
NameAlreadyTaken | When the passed name has already been used. |
The comment must be of the following form: "when %(action_details)s" (e.g. "when the foo package was imported into Ubuntu Breezy").
If the email address is already registered and bound to an
IAccount
, the created IPerson
will have 'hide_email_addresses'
flag set to True.
XXX sabdfl 2005-06-14: this should be extended to be similar or identical to the other person creation argument lists, so we can call it and create a full person if needed. Email would remain the deciding factor, we would not try and guess if someone existed based on the displayname or other arguments.
Get or create a person for a given OpenID identifier. This is used when users login. We get the account with the given OpenID identifier (creating one if it doesn't already exist) and act according to the account's state: - If the account is suspended, we stop and raise an error. - If the account is deactivated, we reactivate it and proceed; - If the account is active, we just proceed. If there is no existing Launchpad person for the account, we create it. :param openid_identifier: representing the authenticated user. :param email_address: the email address of the user. :param full_name: the full name of the user. :param creation_rationale: When an account or person needs to be created, this indicates why it was created. :param comment: If the account is reactivated or person created, this comment indicates why. :return: a tuple of `IPerson` and a boolean indicating whether the database was updated. :raises AccountSuspendedError: if the account associated with the identifier has been suspended.
Return None if there is no person with the given email address.
Return None if there is no person with the given name.
The results will be ordered using the default ordering specified in Person._defaultOrder.
While we don't have Full Text Indexes in the emailaddress table, we'll be trying to match the text only against the beginning of an email address.
If text is an empty string, all persons with at least one email address will be returned.
The results will be ordered using the default ordering specified in Person._defaultOrder.
If exclude_inactive_accounts is True, any accounts whose account_status is any of INACTIVE_ACCOUNT_STATUSES will not be in the returned set.
If must_have_email is True, only people with one or more email addresses are returned.
While we don't have Full Text Indexes in the emailaddress table, we'll be trying to match the text only against the beginning of an email address.
If created_before or created_after are not None, they are used to restrict the search to the dates provided.
The results will be ordered using the default ordering specified in Person._defaultOrder.
While we don't have Full Text Indexes in the emailaddress table, we'll be trying to match the text only against the beginning of an email address.
The old person/team (from_person) will be left as an atavism.
When merging two person entries, from_person can't have email addresses associated with.
When merging teams, from_person must have no IMailingLists associated with and no active members. If it has active members, though, it's possible to have them deactivated before the merge by passing deactivate_members=True. In that case the user who's performing the merge must be provided as well.
We are not yet game to delete the from_person
entry from the
database yet. We will let it roll for a while and see what cruft
develops. -- StuartBishop 20050812
Get all the Persons that are valid.
This method is more effective than looking at Person.is_valid_person_or_team, since it avoids issuing one DB query per person. It queries the ValidPersonOrTeamCache table, issuing one query for all the person records. This makes the method useful for filling the ORM cache, so that checks to .is_valid_person won't issue any DB queries.
Parameters | product | If supplied, only people who have branches in the specified product are returned. |
targets
.Parameters | targets | The sequence of targets for which to get the subscribers. |
recipients | An optional instance of
BugNotificationRecipients .
If present, all found subscribers will be
added to it. |
Personal standing controls whether a person can post to a mailing list they are not a member of without moderation. A person starts out with Unknown standing. Once they have at least one message approved for three different lists, this method will bump their standing to Good. If a person's standing is already Good, or Poor or Excellent, no change to standing is made.