{"action":"reopened","issue":{"url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system/issues/1","repository_url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system","labels_url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system/issues/1/comments","events_url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system/issues/1/events","html_url":"https://github.com/devlovepreet/PHP-oop-login-register-system/issues/1","id":153152008,"number":1,"title":"Group permissions broken","user":{"login":"xb0t3r","id":7511508,"avatar_url":"https://avatars.githubusercontent.com/u/7511508?v=3","gravatar_id":"","url":"https://api.github.com/users/xb0t3r","html_url":"https://github.com/xb0t3r","followers_url":"https://api.github.com/users/xb0t3r/followers","following_url":"https://api.github.com/users/xb0t3r/following{/other_user}","gists_url":"https://api.github.com/users/xb0t3r/gists{/gist_id}","starred_url":"https://api.github.com/users/xb0t3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xb0t3r/subscriptions","organizations_url":"https://api.github.com/users/xb0t3r/orgs","repos_url":"https://api.github.com/users/xb0t3r/repos","events_url":"https://api.github.com/users/xb0t3r/events{/privacy}","received_events_url":"https://api.github.com/users/xb0t3r/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/devlovepreet/PHP-oop-login-register-system/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-05T01:40:24Z","updated_at":"2016-05-05T13:54:27Z","closed_at":null,"body":"If i've got code like this\r\n\r\n`if($user->hasPermission('admin')){`\r\n\t\t`echo '<p>You are an administrator</p>';`\r\n\t`} elseif($user->hasPermission('member')){`\r\n\t\t`echo '<p>You are a member</p>';`\r\n\t`} elseif($user->hasPermission('UnRegistered')){`\r\n\t\t`echo '<p>Activate your account</p>';`\r\n\t`}\r\n`\r\n\r\nthen you will get a undefined index error\r\n\r\n`Notice: Undefined index: admin in C:\\wamp\\www\\NewOracle\\classes\\User.php on line 108`\r\n\r\nbecause the user does not have the permission admin but instead has the permission member\r\nit'll return the undefined index error\r\n\r\nUsing database structure like this\r\n\r\nhttps://gyazo.com/96239f7e82a91e7fd6ecae1f99293b63"}}