src/snac/server/database/DBUser.php
/**
     * List roles for a user.
     *
     * List all the roles for a user by reading from the database. Return an array of Role objects.
     *
     * You might be have expected this function to be called: listalluserroles, listallrolesuser,
     * userallroles, or userroles.
     *
     * @param \snac\data\User $user The user
     *
     * @return \snac\data\Role[] A list of Role objects.
     */
List roles for a user.
List all the roles for a user by reading from the database. Return an array of Role objects.

You might be have expected this function to be called: listalluserroles, listallrolesuser,
userallroles, or userroles.

@param \snac\data\User $user The user

@return \snac\data\Role[] A list of Role objects.
List roles for a user . List all the roles for a user by reading from the database . Return an array of Role objects . You might be have expected this function to be called : listalluserroles listallrolesuser userallroles or userroles . @param \ snac \ data \ User $user The user @return \ snac \ data \ Role [] A list of Role objects .
public function listUserRoles($user)
    {
        $ridList = $this->sql->selectUserRoleIDs($user->getUserID());
        $roleObjList = array();
        foreach($ridList as $rid)
            {
                $roleObj = $this->readRole($rid);
                array_push($roleObjList, $roleObj);
            }
        return $roleObjList;
    }
public function listUserRoles ( $ user ) { $ ridList = $ this -> sql -> selectUserRoleIDs ( $ user -> getUserID ( ) ) ; $ roleObjList = array ( ) ; foreach ( $ ridList as $ rid ) { $ roleObj = $ this -> readRole ( $ rid ) ; array_push ( $ roleObjList , $ roleObj ) ; } return $ roleObjList ; }
List roles for a user.
List roles for a user .