Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
These pages contain theme functions specific for contributed modules
These pages contain theme functions specific for contributed modules
Top Drupal contributor Acquia would like to thank their partners for their contributions to Drupal.
Drupal is a registered trademark of Dries Buytaert.
Comments
i need to customize user login
HI all...i m passing username and password through url.i am using services module.when i pass the authenticated username and password,the site should be logged in.my code is
function _accountservices_index($page, $parameters) {
$login = array();
if(user_authenticate($username, $password))
{
$url="";
$user_obj= user_load_by_name($username);
$uid= $user_obj->uid;
$form_state['uid']=$uid;
$form['name']=array('#value'=>'$username',);
$form['pass']=array('#value'=>'$password',);
$form_state['redirect']=false;
user_login_submit($form,$form_state);
$login["ACCOUNT"]["RESPONSECODE"] = 1;
$login["ACCOUNT"]["ERRORCODE"] = 0;
$login['ACCOUNT']['VERSION']=0.1;
$login["ACCOUNT"]["USERID"] = $user_obj->uid;
}
else {
$login["ACCOUNT"]["RESPONSECODE"] = 0;
$login["ACCOUNT"]["ERRORCODE"] = 500;
$login['ACCOUNT']['VERSION']=0.1;
}
But when the code gets executed it redirects to user login page.Pls tell me the solution