Add wfDeprecated for User::checkPassword(), User::setPassword(),
User::setInternalPassword() and User::checkTemporaryPassword().
With AuthManager mediating between the caller and a set of
authentication providers in a potentially multi-step process,
a password check or change now cannot always be expressed
with a single-step succed-or-fail process. Callers should use
AuthManager::beginAuthentication() with a PasswordAuthenticationRequest
for password checks, and AuthManager::changeAuthenticationData()
for a password change.
Bug: T91699
Change-Id: Ib0ae8f1ff10ae6c2655d529db8b3a32e0cb489b0
* @return bool
*/
public function setPassword( $str ) {
* @return bool
*/
public function setPassword( $str ) {
+ wfDeprecated( __METHOD__, '1.27' );
return $this->setPasswordInternal( $str );
}
return $this->setPasswordInternal( $str );
}
* through the web interface.
*/
public function setInternalPassword( $str ) {
* through the web interface.
*/
public function setInternalPassword( $str ) {
+ wfDeprecated( __METHOD__, '1.27' );
$this->setPasswordInternal( $str );
}
$this->setPasswordInternal( $str );
}
* @return bool True if the given password is correct, otherwise False
*/
public function checkPassword( $password ) {
* @return bool True if the given password is correct, otherwise False
*/
public function checkPassword( $password ) {
+ wfDeprecated( __METHOD__, '1.27' );
+
$manager = AuthManager::singleton();
$reqs = AuthenticationRequest::loadRequestsFromSubmission(
$manager->getAuthenticationRequests( AuthManager::ACTION_LOGIN ),
$manager = AuthManager::singleton();
$reqs = AuthenticationRequest::loadRequestsFromSubmission(
$manager->getAuthenticationRequests( AuthManager::ACTION_LOGIN ),
* @return bool True if matches, false otherwise
*/
public function checkTemporaryPassword( $plaintext ) {
* @return bool True if matches, false otherwise
*/
public function checkTemporaryPassword( $plaintext ) {
+ wfDeprecated( __METHOD__, '1.27' );
// Can't check the temporary password individually.
return $this->checkPassword( $plaintext );
}
// Can't check the temporary password individually.
return $this->checkPassword( $plaintext );
}