-
Notifications
You must be signed in to change notification settings - Fork 176
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
Hide website link for accounts under ten days old #3142
base: main
Are you sure you want to change the base?
Conversation
This is a good start, but it doesn't entirely meet the requested spec. Just at a glance:
|
@kareila I think this should hit all the requirements now? |
Okay, deep breaths. This is like, 70% of the way there! You're doing great. I am going to break this review into three segments.
^^ This line gave me an error: I spent half an hour trying different variations on this to get the right output, so you don't have to. Here's what I ended up with:
Notice I reversed the direction of the comparison, because the link will display normally if the expression is true.
If the page is being viewed logged out, this will fail because $remote will be unset. Also, you've already calculated $spam_time_threshold, and we expect it to usually be true, so it makes sense to check that first. So here's the way I recommend rewriting that:
As written, the "Other people will not see this link..." message will always display to the user if their account is less than 10 days old, but I think we only want to display it if the user has saved a URL. So I would move all this back into the ... Phew, I think that's everything! Thanks for hanging in there <3 |
For what it's worth, I'd never heard of DateTime->now->epoch, so I checked what it does, and it's equivalent to just "time", as in |
ok i thiiiiink that should do it (also tbh don't worry about the big paragraph of feedback; this is still fewer comments than i get from work lmao and that's in a language i'm good at) |
Well sure, and |
Okay, three things:
|
CODE TOUR: To help discourage spammers from registering accounts here, we want to hide the website link on the profile to other users until the account is ten days old, and display a message telling the logged-in user why it's not displaying yet.
Closes #2795.