src/Settings/Settings.php
public static function get_affected_id($for_id)
    {

        // Without auth, return what we have.
        if (! auth()->check())
            return $for_id;

        if (is_null($for_id))
            return auth()->user()->group->id;

        return $for_id;
    }
public static function get_affected_id($for_id)
    {

        // Without auth, return what we have.
        if (! auth()->check())
            return $for_id;

        if (is_null($for_id))
            return auth()->user()->group->id;

        return $for_id;
    }
public static function get_affected_id ( $ for_id ) { // Without auth, return what we have. if ( ! auth ( ) -> check ( ) ) return $ for_id ; if ( is_null ( $ for_id ) ) return auth ( ) -> user ( ) -> group -> id ; return $ for_id ; }
Determine the effected group id.

If this is for a specific id use that, otherwise
assume the currently logged in user's id. If we
dont have an already logged in session, well then
we make the $for_id null.

@param $for_id

@return int|null
Determine the effected group id .