Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Login plugin gotcha: Account filename must be lowercase

plugins

Started by Martin Brown 4 years ago · 1 replies · 506 views
4 years ago

Something I just discovered the hard way so posting in case others hit the same behaviour:

When manually creating or migrating a bunch of user accounts (which I did from Joomla), the underlying filenames in user/accounts directory must all be lower case. Otherwise the login plugin will not find those users. The login IDs themselves are case-insensitive so whether the user logs in with JoeBlogs or joeblogs, the account filename must be joeblogs.yaml for the user to log in.

Probably not completely ideal behaviour.

4 years ago

@MartyB, The name of the account's *.yaml file is the name of the account.

And according the man page of useradd on Linux:

It is usually recommended to only use usernames that begin with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes. They can end with a dollar sign. In regular expression terms: [a-z][a-z0-9-]*[$]?

I guess Grav just follows that longstanding convention. Again, just guessing...

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 293 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago