/**
  * Gets the user roles.
  *
  * @param  User $user
  * @return array
  */
 protected function getRoles(User $user = null)
 {
     $roles = $this->roles->where(['id <> ?'], [Role::ROLE_ANONYMOUS])->orderBy('priority')->get();
     foreach ($roles as $role) {
         if ($role->isAuthenticated()) {
             $role->disabled = true;
         }
         if ($user && $user->getId() == $this['user']->getId() && $user->isAdministrator() && $role->isAdministrator()) {
             $role->disabled = true;
         }
     }
     return $roles;
 }