forked from GNUsocial/gnu-social
ActivityGenerationTests.php fails but doesn't crash anymore.
Fixed an error where a profile id was reused after another profile was deleted, and the new profile still had the deleted role. Fixed ActivityGenerationTests::testNoticeInfoRepeated() which was passing User instead of Profile, throwing errors. tests/ActivityGenerationTests.php now passes. CommandInterpreterTest now passes. Moved JidValidateTest to XmppValidateTest, since Jabber functionality has moved to the XmppPlugin. Tests work but don't pass, but they are at least skipped if XmppPlugin is not active. LocationTest passes, but the tests are not very good. Lots of nulls. MediaFileTest passes. NicknameTest passes. Nickname::normalize() now throws an error if the nickname is too long with underscores. UserFeedParseTest passes. URLDetectionTest passes if $config['linkify']['(bare_ipv4|bare_ipv6| bare_domains)'] are false. Untested otherwise. Fixed Nickname::isBlacklisted() so it does not throw an error if $config['nickname]['blacklist'] not set.
This commit is contained in:
@@ -289,6 +289,11 @@ class User extends Managed_DataObject
|
||||
// TRANS: Profile data could not be inserted for some reason.
|
||||
throw new ServerException(_m('Could not insert profile data for new user.'));
|
||||
}
|
||||
|
||||
// Necessary because id has been known to be reissued.
|
||||
if ($profile->hasRole(Profile_role::DELETED)) {
|
||||
$profile->revokeRole(Profile_role::DELETED);
|
||||
}
|
||||
|
||||
$user->id = $id;
|
||||
|
||||
|
Reference in New Issue
Block a user