I'm looking at checking the Group id of a user then comparing it to the user's Group name. The code I have so far is in the login function (which is still work in progress):

```
$this->User->data = $this->data;

    //find the user based on the data from the login form
    $results = $this->User->findByemail ($this->data['User']['email']);
    $this->User->id = $results['User']['id'];

    $name = 'admin';

    $admin['Group']['name'] = $this->User->Group->find('list', array('conditions' => array('Group.name' => $name)));

        $str1 = $admin;
        $str2 = 'admin';

        if (strcmp($admin, 'admin'))
        {
            debug ('Yes, admin matches'); die();
        }

```

So far I have the find for the group id but I'm struggling to compare the name with the string 'admin'. Any ideas?