I have a very simple test case:
$user->setEmail( $email ); $user->setPassword( $password ); $status = $user->addToDatabase(); if ( !$status->isOK() ) { throw new MWException( $status->getWikiText() ); } // Need to have an id first $user->addGroup( 'translate-sandboxed' ); var_dump( $user->getGroups() ); die();
This prints:
array(2) {
[0]=> string(19) "translate-sandboxed" [1]=> string(19) "translate-sandboxed"
}
It should return it only once.
Version: 1.21.x
Severity: normal