Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
issue with friends list
Browse files Browse the repository at this point in the history
  • Loading branch information
jung35 committed Mar 21, 2015
1 parent 8892fdf commit 629a9fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/Update/CustomList.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Carbon;
use DateTime;
use Auth;
use Session;

use VacStatus\Models\UserList;
use VacStatus\Models\UserListProfile;
Expand All @@ -30,8 +29,12 @@ function __construct($userList)
$userId = Auth::User()->id;

$friendsListCacheName = "friendsList_{$userId}";

$friendsList = Session::get($friendsListCacheName);
if(!Cache::has($friendsListCacheName) && $userList->privacy == 2)
{
$this->error = "list_no_permission"; return;
}

$friendsList = Cache::get($friendsListCacheName);

if($userId != $userList->user_id) {
if(($userList->privacy == 3)
Expand All @@ -40,7 +43,6 @@ function __construct($userList)
$this->error = "list_no_permission"; return;
}
}

} else if($userList->privacy == 2 || $userList->privacy == 3) {
$this->error = "list_no_permission"; return;
}
Expand Down

0 comments on commit 629a9fe

Please sign in to comment.