Skip to content

Commit

Permalink
Remove hardcoded password when it's changable
Browse files Browse the repository at this point in the history
  • Loading branch information
valorin committed Oct 9, 2023
1 parent d8deede commit c0d5157
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Illuminate/Auth/Authenticatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ trait Authenticatable
*/
protected $rememberTokenName = 'remember_token';

/**
* The column name of the auth password field.
*
* @var string
*/
protected $authPasswordName = 'password';

/**
* Get the name of the unique identifier for the user.
*
Expand Down Expand Up @@ -48,7 +55,7 @@ public function getAuthIdentifierForBroadcasting()
*/
public function getAuthPasswordName()
{
return 'password';
return $this->authPasswordName;
}

/**
Expand All @@ -58,7 +65,7 @@ public function getAuthPasswordName()
*/
public function getAuthPassword()
{
return $this->password;
return $this->{$this->getAuthPasswordName()};
}

/**
Expand Down

0 comments on commit c0d5157

Please sign in to comment.