protected function storeUser(array $credentials, $activate = false)
{
$cred = array('first_name' => $credentials['first_name'], 'last_name' => $credentials['last_name'], 'email' => $credentials['email'], 'password' => $credentials['password']);
if (array_key_exists('permissions', $credentials)) {
$cred['permissions'] = $credentials['permissions'];
}
$user = $this->sentry->register($cred, $activate);
if (array_key_exists('groups', $credentials)) {
$this->syncGroups($credentials['groups'], $user);
}
return $user;
}