Skip to content

Commit

Permalink
setPassword is gone from MediaWiki 1.35 and needs to be replaced with…
Browse files Browse the repository at this point in the history
… changeAuthenticationData

related to CWRUChielLab#12
  • Loading branch information
tpokorra committed Oct 6, 2022
1 parent 9db3ebb commit dd0c90e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CASAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ function casLogin($user) {
// PwdSecret is used to salt the username, which is
// then used to create an md5 hash which becomes the
// password
$u->setPassword(
md5($username.$CASAuth["PwdSecret"])
);

$hashed_secret = md5($username.$CASAuth["PwdSecret"]);
$u->changeAuthenticationData( [
'username' => $u->getName(),
'password' => $hashed_secret,
'retype' => $hashed_secret,
] );

$u->setToken();
$u->saveSettings();

Expand Down

0 comments on commit dd0c90e

Please sign in to comment.