Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mildabre opened this issue May 18, 2023 · 0 comments
Open

Comments

@mildabre
Copy link

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant