[freeside-commits] freeside/fs_selfservice/fri/includes login.php, 1.2, 1.3 main.conf.php, 1.1.1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Sun Mar 16 19:48:17 PDT 2008
Update of /home/cvs/cvsroot/freeside/fs_selfservice/fri/includes
In directory wavetail.420.am:/tmp/cvs-serv14706/includes
Modified Files:
login.php main.conf.php
Log Message:
first bits of working FRI! woop!
Index: login.php
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/fri/includes/login.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- login.php 16 Mar 2008 21:07:04 -0000 1.2
+++ login.php 17 Mar 2008 02:48:14 -0000 1.3
@@ -280,33 +280,40 @@
}
// freeside login
- $freeside = new FreesideSelfService()
+ $freeside = new FreesideSelfService();
$domain = 'svc_phone';
$response = $freeside->login( array(
- 'username' => strtolower($_username),
+ 'username' => strtolower($username),
'domain' => $domain,
'password' => strtolower($password),
) );
error_log("[login] received response from freeside: $response");
$error = $response['error'];
- if ( ! $error ) {
+ if ( ! $error && $response['session_id'] ) {
// sucessful freeside login
error_log("[login] logged into freeside with session_id=$session_id");
// store session id in your session store, to be used for other calls
//$fs_session_id = $response['session_id'];
- $_SESSION['fs_session'] = $response['session_id'];
+ $_SESSION['freeside_session_id'] = $response['session_id'];
+
+ $customer_info = $freeside->customer_info( array(
+ 'session_id' => $_SESSION['freeside_session_id'] ,
+ ) );
+ //XXX error checking here too
+ $displayname = $customer_info['name'];
} else {
// unsucessful login
error_log("[login] error logging into freeside: $error");
$auth = false;
+ $extension = '';
// display error message to user
- $_SESSION=['ari_error'] = _("Incorrect Username or Password");
+ $_SESSION['ari_error'] = _("Incorrect Username or Password");
}
Index: main.conf.php
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/fri/includes/main.conf.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- main.conf.php 16 Mar 2008 19:58:25 -0000 1.1.1.1
+++ main.conf.php 17 Mar 2008 02:48:14 -0000 1.2
@@ -108,7 +108,8 @@
# sets the default user page
# option: Comma delimited list of module names (ie voicemail,callmonitor,help,settings)
#
-$ARI_DEFAULT_USER_PAGE = "voicemail";
+#$ARI_DEFAULT_USER_PAGE = "voicemail";
+$ARI_DEFAULT_USER_PAGE = "dashboard";
#
# enables ajax page refresh
More information about the freeside-commits
mailing list