Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Login plugin gotcha: Account filename must be lowercase

plugins

Started by Martin Brown 4 years ago · 1 replies · 589 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 renedebaaij, 2 days ago
0 36 2 days ago
Plugins · by complanar, 3 weeks ago
6 389 2 weeks ago
Plugins · by BenLaKnet, 2 weeks ago
1 206 2 weeks ago
Plugins · by complanar, 1 month ago
2 480 4 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 760 2 months ago