summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ff037a9)
This changes User::getActorId() to include the user name and id
when throwing an exception. This doesn't solve the problem
reported in T211450, but should allow the the probelmatic user
name to be identified.
Bug: T211450
Change-Id: Ie83ce6ad6b5ef18ea44a52e204f580cd9c992148
(cherry picked from commit
db3e7f8b7e81eed410e6f82f939038768efd27ce)
];
if ( $q['actor_user'] === null && self::isUsableName( $q['actor_name'] ) ) {
throw new CannotCreateActorException(
];
if ( $q['actor_user'] === null && self::isUsableName( $q['actor_name'] ) ) {
throw new CannotCreateActorException(
- 'Cannot create an actor for a usable name that is not an existing user'
+ 'Cannot create an actor for a usable name that is not an existing user: ' .
+ "user_id={$this->getId()} user_name=\"{$this->getName()}\""
);
}
if ( $q['actor_name'] === '' ) {
);
}
if ( $q['actor_name'] === '' ) {
- throw new CannotCreateActorException( 'Cannot create an actor for a user with no name' );
+ throw new CannotCreateActorException(
+ 'Cannot create an actor for a user with no name: ' .
+ "user_id={$this->getId()} user_name=\"{$this->getName()}\""
+ );
}
$dbw->insert( 'actor', $q, __METHOD__, [ 'IGNORE' ] );
if ( $dbw->affectedRows() ) {
}
$dbw->insert( 'actor', $q, __METHOD__, [ 'IGNORE' ] );
if ( $dbw->affectedRows() ) {
);
if ( !$this->mActorId ) {
throw new CannotCreateActorException(
);
if ( !$this->mActorId ) {
throw new CannotCreateActorException(
- "Cannot create actor ID for user_id={$this->getId()} user_name={$this->getName()}"
+ "Failed to create actor ID for " .
+ "user_id={$this->getId()} user_name=\"{$this->getName()}\""