Invalidate a user's password

@param   mixed   $user
@return  bool
552024
public static function invalidatePassword($user = null)
	{
		$hzup = self::getInstance($user);

		$hzup->__set('shadowFlag', '-1');
		$hzup->update();

		return true;
	}
11570
public function restore_key( $user ) 
	{
		return \CCStr::hash( $user->password.'@'.$user->{$this->config->user_key}.'%'.\CCIn::client()->agent );
	}
749838
protected function validateReset(array $credentials)
	{
		if (is_null($user = $this->getUser($credentials)))
		{
			return self::INVALID_USER;
		}

		if ( ! $this->validNewPasswords($credentials))
		{
			return self::INVALID_PASSWORD;
		}

		if ( ! $this->reminders->exists($user, $credentials['token']))
		{
			return self::INVALID_TOKEN;
		}

		return $user;
	}
493066
private function processChangePassword(User $user, $password, $confirmPassword)
    {
        if (empty($password)) {
            return Errors::PASSWORD_INVALID;
        }

        if ($password !== $confirmPassword) {
            return Errors::CONFIRM_PASSWORD_INVALID;
        }

        /** @var UserMapper $mapper */
        $mapper = MapperFactory::getUserMapper();

        $user->setPassword($password);
        $mapper->update($user);

        // Now login this user.
        return $this->module->login($this->request, $user);
    }
1032324
public function resetPassword(Request $request)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('user', 'update')) {
            return $this->noPermission();
        }
        // validation
        $validator = Validator::make(
            $request->all(), [
            'password' => 'required|same:confpassword',
            'id' => 'required',
            ]
        );

        // if validation fails return json response
        if ($validator->fails()) {
            return $this->response("Please check all required fields!", 400, null, false, false, true, $validator->errors());
        }

        $user = User::where('userID', $request->id)->update(
            [
            'password' => $password = Hash::make($request->password)
            ]
        );

        if ($user) {
            $result = $this->response('Password is updated');
        }else{
            $result = $this->response('Internal server error. Please try again later', 500);
        }
        return $result;
    }
373738
public function invalidate($token = false)
    {
        $this->requireToken($token);

        return $this->manager->invalidate($this->token);
    }
131707
public function deleteUser(User $user, string $password) : bool {
		if ($user->doesPasswordMatch($password)) {
			$stmt = $this->db->prepare(
				"DELETE FROM accounts " .
				"WHERE id=? AND username=? AND email=?;"
			);
			$stmt->bind_param("iss",
				$user->id, $user->username, $user->email);
			$stmt->execute();
			$this->db->commit();
			return true;
		} else {
			return false;
		}
	}
465827
public function validate(IUser $user): bool
    {
        if (null === $password = make(IPasswordRepository::class)->getByUser($user)) {
            return false;
        }

        return make(IPasswordHandler::class)->verify($this->password, $password->value());
    }
1126844
public function isValid(UserInterface $user, $password)
    {
        return $this->password->verify($password, $user->getPassword());
    }
598602
public function validatePassword($password)
    {
        $model = static::findIdentity($this->username, $password);

        return (bool) $model->id;
    }
949929
public function setPassword($password)
    {
        if (null === $password) {
            return $this;
        }

        if (!is_string($password) || trim($password) == '') {
            throw new InvalidPasswordException();
        }

        $this->password = $password;

        return $this;
    }
1167054
protected function verifyUser($user, $password)
    {
        if (!isset($this->userList[$user]))
        {
            return false;
        }
        if ($this->userList[$user] != $password)
        {
            return false;
        }
        return true;
    }
826337
public function remove(User $user) : bool
    {
        if (!$user->delete()) {
            throw new \RuntimeException($this->i18n->t('setrun/user', 'Removing error'));
        }
        return true;
    }
470506
public function resetPassword()
    {
        if ($this->validate() && ($user = $this->getUser()) != null) {
            $user->resetPassword($this->password);
            return true;
        }
        return false;
    }
160915
public static function changePassword($user = null, $password)
	{
		$passhash = self::getPasshash($password);

		return self::changePasshash($user, $passhash);
	}
1054612
public function resetPassword()
    {
        $user = $this->user;
        $user->setPassword($this->password);
        $user->removePasswordResetToken();

        return $user->save();
    }
994857
public function removeUser($user)
    {
        if ($this->getUsers()->contains($user))
        {
            $this->getUsers()->removeElement($user);
            $user->removeGroup($this);
        }
        return $this;
    }