src/Searsaw/Drawbridge/models/BridgeUser.php
public function addRoleByObject(BridgeRole $role_obj)
    {
        if (! $role_obj->exists)
            $role_obj->save();

        $role_id = $role_obj->getKey();

        return $this->addRoleById($role_id);
    }
public function addRoleByObject(BridgeRole $role_obj)
    {
        if (! $role_obj->exists)
            $role_obj->save();

        $role_id = $role_obj->getKey();

        return $this->addRoleById($role_id);
    }
public function addRoleByObject ( BridgeRole $ role_obj ) { if ( ! $ role_obj -> exists ) $ role_obj -> save ( ) ; $ role_id = $ role_obj -> getKey ( ) ; return $ this -> addRoleById ( $ role_id ) ; }
Add a single role to the user by using the Role object

@param $role_obj \Searsaw\Drawbridge\Models\BridgeRole The Role object to add

@return \Searsaw\Drawbridge\Models\BridgeRole
Add a single role to the user by using the Role object