<div dir="ltr">Hi,<div><br></div><div>I intend to filter the results returned by SimpleSearch method in Users.pm based on the custom field value set in the current user logged in.</div><div><br></div><div>I am using Hook::LexWrap in the Users_Local.pm overlay file, to write a post method to filter the results of SimpleSearch. How can I get a ref of CurrentUser which in turn will help to fetch the custom field value on that user?</div><div><br></div><div>I tried using </div><div>my $user = $self->CurrentUser;</div><div><br></div><div>But getting the following error:</div><div>[error]: Can't locate object method "CurrentUser" via package "Privileged" (perhaps you forgot to load "Privileged"?) <br></div><div><br></div><div>Can anybody suggest what am I doing wrong here? </div><div><br></div><div>Thanks in Advance.</div><div><br></div><div>-Aniket</div></div>