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

Add User::profile_link() method #2682

Closed
2 tasks
gchtr opened this issue Nov 24, 2022 · 2 comments · Fixed by #2924
Closed
2 tasks

Add User::profile_link() method #2682

gchtr opened this issue Nov 24, 2022 · 2 comments · Fixed by #2924

Comments

@gchtr
Copy link
Member

gchtr commented Nov 24, 2022

As discussed in #2676, we could add a User::profile_link() method that get’s the link the profile admin page if a user is logged in. This is more clear than User::edit_link(), where you might assume that you get URL to edit other users.

  • Add User::profile_link() method
  • Add tests.
@Levdbas
Copy link
Member

Levdbas commented Dec 14, 2023

Hi @gchtr ,

I would like to take a shot at this. How does this sound?

  • Add a new is_current_user() method that matched the User object id with get_current_user_id()
  • Add new profile_link() method that returns get_edit_profile_url() when is_current_user() is true

@gchtr
Copy link
Member Author

gchtr commented Feb 9, 2024

@Levdbas Sounds good! The only thing I would change is to name the method is_current() instead of is_current_user(). I’ll assign this to you, then 😊.

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

Successfully merging a pull request may close this issue.

2 participants