Closed Thominho closed 4 years ago
For others..
use BackendAuth;
public function getUserOptions()
{
// placeholder
$result = [0 => 'indikator.news::lang.form.select_user'];
// 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;
}
Hi,
I want the author of the post to always be automatically only the user who publishes the post. Can this be achieved here?
Big thank you!
Idea - https://ibb.co/VM2Rrr3