dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
User: better error message when getActorId fails.
[lhc/web/wiklou.git]
/
includes
/
user
/
User.php
diff --git
a/includes/user/User.php
b/includes/user/User.php
index
2679e87
..
a677ede
100644
(file)
--- a/
includes/user/User.php
+++ b/
includes/user/User.php
@@
-2280,11
+2280,15
@@
class User implements IDBAccessObject, UserIdentity {
];
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() ) {
@@
-2301,7
+2305,8
@@
class User implements IDBAccessObject, UserIdentity {
);
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()}\""
);
}
}
);
}
}