<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ //register all available language $available_languages = ossn_get_available_languages(); foreach ($available_languages as $language) { ossn_register_language($language, ossn_route()->locale . "ossn.{$language}.php"); } ossn_default_load_locales(); /** * Initialize the css library * * @return void */ function ossn_initialize() { $url = ossn_site_url(); $icon = ossn_site_url('components/OssnWall/images/news-feed.png'); ossn_register_sections_menu('newsfeed', array('text' => ossn_print('news:feed'), 'url' => "{$url}home", 'section' => 'links', 'icon' => $icon)); ossn_extend_view('ossn/js/head', 'javascripts/head'); ossn_extend_view('ossn/admin/js/head', 'javascripts/head'); //actions ossn_register_action('user/login', ossn_route()->actions . 'user/login.php');
redirect(REF); } //check if password then change password if (!empty($password)) { if (!$OssnUser->isPassword()) { ossn_trigger_message(ossn_print('password:error'), 'error'); redirect(REF); } $salt = $OssnUser->generateSalt(); $password = $OssnUser->generate_password($password, $salt); $params['names'] = array('first_name', 'last_name', 'email', 'password', 'salt'); $params['values'] = array($user['firstname'], $user['lastname'], $user['email'], $password, $salt); } $language = input('language'); $success = ossn_print('user:updated'); if (!empty($language) && in_array($language, ossn_get_available_languages())) { $lang = $language; } else { $lang = 'en'; } //save if ($OssnDatabase->update($params)) { //update entities $guid = $user_get->guid; if (!empty($guid)) { $user_get->data->gender = $user['gender']; $user_get->data->birthdate = $user['birthdate']; $user_get->data->language = $lang; $user_get->save(); } ossn_trigger_message($success, 'success');