Visual Phone Book Public

  1. 6 years ago

    Does anyone know of a way to turn off the public option for visual phone book make the phone book private only?

  2. admin

    9 Apr 2013 Administrator

    Well, not sure about the complete changes, but you have to modify phonebook.php, look for this line:

    $grid->set_condition("context='$context' AND (owner='$extension' OR (owner<>'$extension' AND private='no'))");

    You want to change it to private='yes' so only private records are shown. Then you have to force the private field to be "yes", perhaps with

    $grid->set_default_values("private",'yes');

    I have not tried this, but it might work.

  3. With your help, this is what I did and it works perfect.

    Changed;
    $grid->set_condition("context='$context' AND (owner='$extension' OR (owner<>'$extension' AND private='yes'))");
    To;
    $grid->set_condition("context='$context' AND (owner='$extension')");

    Then it make no difference if they choose private or public. No one can see anything but their own extension phone book.

    This works as well so that all records will be "yes" by default
    $grid->set_default_values("private",'yes');

    A future feature would be great so that each user can decide which extensions can see their visual phone book.

    Thanks for the help!!!

or Sign Up to reply!