<?php
# authenticate the user and add him to his group
if ($uid = $user->authenticate(array('username' => $attributes[userid], 'password' => md5($attributes['password']))) {
$authenticated = true;
$user->addUserToGroup(array( "uid" => $uid, "gid" => $user->getUserGroup()));
}
else
$authenticated = false;
?>