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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Login plugin gotcha: Account filename must be lowercase

plugins

Started by Martin Brown 3 years ago · 1 replies · 414 views
3 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.

3 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 Rene, 1 week ago
2 49 1 week ago
Plugins · by Xavier, 4 weeks ago
2 57 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1184 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 75 2 months ago