summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f90f377)
raw | patch | inline | side by side (parent: f90f377)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 12:26:55 +0000 (12:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 12:26:55 +0000 (12:26 +0000) |
We schoul use the DB PIN, because this one is up to date.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1305 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1305 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index ad23ecfcb7a947527c0643efc6b1a9e46b0f740e..003d75b4165f255b0bfbe66af5b5867e893f82c9 100644 (file)
$this->is_modified = true;
}
+
+ /* Get voicemail PIN from MySQL DB
+ * Because every user can change his PIN directly from the phone
+ * without any update to the ldap
+ * This means, the PIN in the DB is up to date
+ */
+ // Connect to DB server
+ if((isset($a_SETUP))&&(isset($a_SETUP['SERVER']))&&(isset($a_SETUP['LOGIN']))&&(isset($a_SETUP['PASSWORD']))){
+ $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ if($r_con){
+ $r_db = @mysql_select_db($a_SETUP['DB'],$r_con);
+ $vp = mysql_fetch_row(mysql_query("SELECT voicemail_users.password FROM `voicemail_users`,`sip_users` WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'"));
+
+ if((isset($vp[0]))&&(!empty($vp[0]))){
+ $this->goFonPINVoice = $vp[0];
+ }
+ }
+ }
}