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

Delete author selection option #1

Open
Thominho opened this issue Aug 30, 2020 · 2 comments · May be fixed by #2
Open

Delete author selection option #1

Thominho opened this issue Aug 30, 2020 · 2 comments · May be fixed by #2
Labels
enhancement New feature or request

Comments

@Thominho
Copy link

Hi, thank you for the super pluigin!

Just, can I ask you for help? I would need to remove the author selection option, I want the author to always be the user who creates the post.

Will you please tell me what to do? Thank you.

@Thominho
Copy link
Author

For others...

on the page Models/post.php

Change original to -

use BackendAuth;

public function getUserIdOptions()
  {
  // placeholder
  $result = [];

  // only back-end user which is currently logged in
  // it will be available always as we are in back-end :)
  $user = BackendAuth::getUser();
  $result[$user->id] = $user->login; // or $user->email;    

  return $result;
  }

@jeroenvanrensen jeroenvanrensen added the enhancement New feature or request label Aug 30, 2020
@jeroenvanrensen
Copy link
Owner

Hi @Thominho,

I'm glad you like this plugin! I will work on your suggestion soon!

Could you please create a pull request and put your refactoring there? It makes everything more clear.

Thank you! Jeroen

@jeroenvanrensen jeroenvanrensen linked a pull request Aug 31, 2020 that will close this issue
@jeroenvanrensen jeroenvanrensen linked a pull request Aug 31, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants