Skip to content

Change parameter name $user in Nette\Security\Authenticator to $username #73

@mildabre

Description

@mildabre

Hi,

interface Nette\Security\Authenticator has two string parameters: $user and $password. The name of the parameter $user may led to naming confusion in this cases:

a) with Nette\Security\User which is by default present in Nette presenters like $presenter->user and in Nette templates like $user

b) with the database table user - it is a common practice use table user with field username (login) for authentication

Therefore I propose to change the name of the parameter $user to $username like this:

interface Authenticator
{
	.......

	function authenticate(string $username, string $password): IIdentity;
}

github:

function authenticate(string $user, string $password): IIdentity;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions