Set the password of this user.

@param string $password

@return User
168463
public function setPassword(string $password): User
    {
        DB::table('user')
            ->where('user_id', '=', $this->user_id)
            ->update([
                'password' => password_hash($password, PASSWORD_DEFAULT),
            ]);

        return $this;
    }
149819
protected function resetPassword($user, $password)
    {
        $user->password = Hash::make($password);

        $user->setRememberToken(Str::random(60));

        $user->save();

        event(new PasswordReset($user));
    }
892064
public function authCredentials(string $username, string $password): self
    {
        $this->username = $username;
        $this->password = $password;
        return $this;
    }
776167
public function login(string $login, string $password)
    {
        $user = $this->auth_repository->login($login, $password);

        if (null === $user) {
            return null;
        }

        if ($this->container->has('user')) {
            unset($this->container['user']);
        }
        $this->container['user'] = $user;

        return $this->auth_storage->setUser($user);
    }
883580
public function setEmailPassword($email, $password)
    {
        if (isset($this->apikey)) {
            throw new \Exception(
                "ApiKey already set."
            );
		}
		$this->emailPassword = $email.': '.$password;
		return $this;
    }
587835
public function setPassword(string $password) : void
    {
        $this->password_hash = Yii::$app->security->generatePasswordHash($password);
    }
1147271
public function setPassword($password)
    {
        $this->{$this->passwordHashAttribute} = Yii::$app->security->generatePasswordHash($password);
    }
278505
public function setPassword($password)
    {
        $this->definition->setPassword($this, $password);
        $this->setPasswordResetRequired(false);
        $this->refresh();   // force refresh
        return $this;
    }
301969
protected function setPassword($password) {
        if (!isset($password)) $password = '';
        else if (!is_string($password)) throw new IllegalTypeException('Illegal type of parameter $password: '.gettype($password));

        $this->password = $password;
        return $this;
    }
1276763
public function hashPassword($password)
    {
        if ($this->mode == self::MODE_BCRYPT) {
            return $this->hashModeBcrypt($password);
        } elseif ($this->mode == self::MODE_PBKDF2) {
            return $this->hashModePbkdf2($password);
        }

        $this->error = 'You have to set the mode...';
        $this->cwsDebug->error($this->error);
    }
1332848
protected function resetPassword($user, $password)
    {
        $user->forceFill([
            'password' => bcrypt($password),
            'remember_token' => Str::random(60),
        ])->save();

        $this->guard()->login($user);
    }
376749
public function auth($password)
    {
        $response = $this->__call('auth', [$password]);
        $this->setPassword($password);

        return $response;
    }
1205297
public function setPassword($password)
    {
        if(!$this->isValidPassword($password)){
            return false;
        }

        if ($this->setPasswordStatement === null) {
            $this->setPasswordStatement = $this->connection->prepare("UPDATE User SET password=? WHERE username=?");
            $this->setPasswordStatement->bindParam(1, $this->password);
            $this->setPasswordStatement->bindParam(2, $this->username);
        }
        $wasLoggedIn = $this->isLoggedIn();
        $this->password = $this->hashPassword($password);
        $this->setPasswordStatement->execute();

        if ($wasLoggedIn) {

            $this->updateLoginSession();
        }

        return true;
    }
106509
public function withUserInfo($user, $password = null)
    {
        $this->user = $user;
        $this->password = $password;

        return $this;
    }
252382
protected function applyPassword($password)
    {
        // If the model has a mutator for the password field, we
        // can assume hashing passwords is taken care of.
        // Otherwise, we will hash it normally.
        $password = $this->model->hasSetMutator($this->column()) ? $password : Hash::make($password);

        $this->model->setAttribute($this->column(), $password);
    }
666010
public function setAuth($login, $password)
    {
        $this->login    = $login;
        $this->password = $password;

        $this->apiClient
            ->setBearerToken(null)
            ->setShopId($this->login)
            ->setShopPassword($this->password);

        return $this;
    }
1368627
public function setChapPassword($password)
    {
        $chapId = $this->getChapId();
        $chapMd5 = $this->getChapPassword($password, $chapId, $this->getRequestAuthenticator());

        $this->setAttribute(3, pack('C', $chapId) . $chapMd5);

        return $this;
    }